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:
- Intake, Jurisdiction, and 10 Exemption Pathways: Normalizes legacy
TBuilding 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. - 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 sharedFoundationModels.ToolField Copilot queries offline at$0, scrubs tenant lease/CISR PII strictly on device (ONLY_ON_DEVICE,0Braw PII to cloud), runs hands-free rooftop Gemini Live Ladder Mode on Wi-Fi, checks LADWP/SoCalGas equipment rebates via Google Search Grounding (WKWebViewSearch Suggestions), and reconciles walkthrough video + non-PII snapshots via Gemini 4 (ONLY_IN_CLOUD) to surface Go Back & Verify cards withMM:SStimestamps and 1-tap fixes. - Multi-Page Utility PDFs, Solar Screening, and 17-Check DQC: Parses 6-page multi-SA LADWP and SoCalGas PDFs (applying
40xCT multipliers, summingSMALL + LARGEcompound water dials inHCF = ccf, and excludingLASANSewer/Fire charges), runs 17 deterministic checks across 15LA-*/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 +$0offline fallback. - 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
/judgedesktop filing desk (https://judge.wattwalk.co) runningfirebase/aiInferenceMode.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/judgelocal-only toggle.PrivacyRedactor.swifthas zero Firebase imports; deterministic regex scrubbing +SystemLanguageModel.defaultlogs0B Raw PII to Cloudinto append-only FirestoreprivacyReceiptsenforced byfirestore.rules.PREFER_ON_DEVICE: Basement meter/equipment scans & lobby hours (App/HybridAI.swift), Hybrid Field Copilot (App/HybridFieldTools.swift), and Chrome/judgeExecutive Brief & Chiller Plate verifier (web/src/services/hybridAI.ts). SharedLanguageModelSession+ 3FoundationModels.Tooldefinitions run on AppleSystemLanguageModel.defaultoffline at$0(and Chrome Built-in AI Gemini Nano on desktop). Queued glared captures auto-upgrade on Wi-Fi viafirebaseAI.geminiLanguageModel(name:)orgenerativeModel(gemini-4-neonwith automatic free-tiergemini-4-hydrogenfallback).PREFER_IN_CLOUD: Tier A Rooftop Solar Screening (App/SolarScreeningService.swift), cloud-mode Hybrid Field Copilot, and Chrome/judgecloud toggle. Uses the App-Check-protectedscreenRooftopSolarCloud Function or Gemini 4 online, falling back to Google Maps Grounding, Apple FM, or$0local 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 (WKWebViewsuggestions +SOURCES FROM GOOGLE MAPS), Python Code Execution, and Live Ladder Mode (LiveSession). All calls run through Firebase AI Logic withuseLimitedUseAppCheckTokens: true(AppAtteston iOS,ReCaptchaEnterpriseProvideron 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 ailogicfollowing the official Firebase Agent Skills workflow (firebase-ai-logic-basics) so fresh clones avoidPERMISSION_DENIEDsetup failures. - iOS 27 Hybrid Router (
App/HybridAI.swift): Implements the WWDC 2026 native Apple Foundation Models adapter (SystemLanguageModel.default+firebaseAI.geminiLanguageModel(name:)insideLanguageModelSession) and bridges SDK13.1.1's imageAttachmentlimit by escalating glared meter and chiller plates tofirebaseAI.generativeModelwith full-plate + Vision ROI crops. - Unified Hybrid Field Copilot (
App/HybridFieldTools.swift): Shares 3 pureFoundationModels.Toolimplementations (CheckSiteReadinessTool,CheckDQCAndDeadlinesTool,CheckEnergyBaselineTool) acrossSystemLanguageModel.defaultandfirebaseAI.geminiLanguageModel(name:)over non-PIIFieldAuditToolContext. - Live Ladder Mode (
App/LiveLadderSessionService.swift,App/LiveLadderToolRouter.swift): Connectsai.liveModel(...)(LiveSessionongemini-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 withconsume: true), falls back toTool.googleMaps()cloud grounding, and falls back to$0deterministic LA PV math to produceECM-PV. - Cloud Multimodal, Grounding, Templates, and Python Math (
App/CloudComplianceService.swift): Combines strict JSONSchemawalkthrough video/PDF parsing,templateGenerativeModel(prompts/ebewe-espm-dqc-audit-v1.md+ in-repo fallback),Tool.googleMaps()(SOURCES FROM GOOGLE MAPSUI),Tool.googleSearch()(WKWebViewSearch Suggestions UI), andTool.codeExecution()Python verification. - Chrome Desktop Companion (
web/src/services/hybridAI.ts,web/src/services/firebase.ts): Uses Firebase JS SDK13.4.0withReCaptchaEnterpriseProvider,useLimitedUseAppCheckTokens: true, andInferenceMode(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/35passing XCTests across 7 suites (WattwalkTests), physical iPhone E2E tests (WattwalkPhysicalE2EUITests), cleanwebTypeScript/Vite builds, App Check limited-use replay protection, Remote Config model switching, Firestore offline cache, and append-onlybytesSentToCloud == 0privacyReceiptsrules.
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,
HybridAIrouter,ONLY_ON_DEVICEPrivacyRedactor,HybridFieldTools, Gemini Live Ladder Mode + 4-tool router, 3-tier Rooftop Solar +screenRooftopSolarGen 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/judgeweb 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/1IDs), 11,498 LA buildings facing the June 1$202 -> $707penalty 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.defaultstructure LADWP electric meterPM00209-00042119on device at$0, and Ask Field Copilot executes sharedFoundationModels.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 inApp/PrivacyRedactor.swift) scrubs names, phones, emails, and account digits and logs append-only0B Raw PII to Cloudprivacy receipts enforced byfirestore.rules.1:15 - 1:42: Reconnect online (ONLINE / SYNCEDFirestore 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#90126258at00:08with 1-tap fixes.1:42 - 2:13: Step 1 Google Maps Grounding (SOURCES FROM GOOGLE MAPSclickable citations) + LiDAR spatial conditioning + Rooftop Solar screening (ECM-PV); Step 3 Sample 6-Page PDF parser (40xCT, compound water dials,LASANexclusion), 17-check DQC catchingPM-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/judgecompanion (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
- Public GitHub Repo: https://github.com/mrbese/wattwalk-hybrid
- Live
/judgeChrome Companion: https://judge.wattwalk.co (Firebase Hosting mirror: https://wattwalk-judge.web.app) - TestFlight Public Link (iOS 27): https://testflight.apple.com/join/gKQfgFSs
- YouTube Demo Video (
2:46): https://youtu.be/NKTUgWSfHSM - Firebase AI Logic Evidence Catalog: https://github.com/mrbese/wattwalk-hybrid/blob/main/docs/FIREBASE_AI_LOGIC_USAGE.md
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