LevSMS — Full Code + Sheet Audit

What it is: Beginning-to-end audit of the LevSMS router — original vs current code, what's needed / still needed / old & stale, plus a full review of every backend Sheet tab.
Generated: Tuesday, May 26 2026 · 3:11 PM EDT (NY)
Repo / deploy: zee78900/levsms · commit 7293614 · live deploy @32
Sources: levsms/router/Code.js (2,450 lines, 103 functions) · backend Sheet (10 tabs) captured 2026-05-26
Verdict: the system is healthy and pilot-ready. No bugs found. The stale-davening bug that started this work is gone. The audit surfaces only cleanup + 3 decisions, none blocking: 2 dead functions (removed this pass), 4 vestigial sheet rows (auto-pruned by the cleanup already shipped), and 2 orphaned tabs + 1 dark delivery log that are leftover from the original architecture — harmless, but yours to keep, wire, or archive.

1. Code audit — clean

2. Original → current architecture (the "old vs new")

The M1 rebuild changed where the davening schedule lives. This is the root of every "orphan" below — they're not bugs, they're leftovers from the first design.

ConcernOriginal designCurrent (M1 rebuild)
Davening schedule sourceRead live from the SHUL_TIMES tab (76 rows, rich schema)Rendered from NW_SCHEDULE / NW_SHULS code constants + live Hebcal
Command routingCOMMANDS tab (Enabled / Public flags)resolveIntent_ + CMD_SHORTCUTS in code
Plag Mincha (KBH Bais Dovid)Hand-entered weeklyComputed live: Hebcal plag − 10 (≈1 min earlier than shul board = safe, you never miss it)

3. Sheet audit — 10 tabs

TabRowsStatusNote
INBOUND_LOG311LIVEEvery inbound text. Growing.
OUTBOUND_LOG336LIVEEvery reply + source + SENT status. Growing.
DELIVERY_LOG311DARK since 5/17Twilio delivery callbacks. Sends don't request a statusCallback, so nothing's logged here since 5/17. Low impact — OUTBOUND_LOG already records SENT.
CONTACTS41LIVEPhone / status / ZIP / tier. Real testers + you + the LevSMS line.
ZIP_REQUESTS2LIVEOut-of-area ZIP requests queued for review.
SYSTEM_RESPONSES13LIVEFramework messages (welcome, menu, help…). Missing BAD_AREA → self-heals on next REFRESH.
APPROVED_RESPONSES17→13LIVE13 served commands, all updated 5/26. 4 vestigial rows (MENU, YERUSHALMI, TANAKH, CHOFETZ — frozen 5/14, pre-dating your "Daf+Mishna only" trim) are auto-pruned by the cleanup already shipped on next REFRESH.
COMMANDS10ORPHANEnabled/Public flags — not read by the router (routing is in code). Also incomplete (10 of ~18 commands). Decide: wire as a kill-switch, or archive.
SHUL_TIMES76ORPHAN9 shuls, rich schema (season/conditional/shiur). Seeded but never read — superseded by code constants. Decide: promote to source-of-truth (more transparent, sheet-editable), or archive.
SETTINGS4LIVEKey/Value config.

4. What's still needed (not built — by design)

5. Three decisions for you (none urgent)

My recommendation: leave all three as-is for the pilot (they don't affect anyone texting in). Revisit SHUL_TIMES + DELIVERY only if/when you go past the pilot. Don't overcomplicate — confirmed by you this session.

Source trail
File: outputs/2026-05-26_15-11_audit_levsms-code-and-sheet.html
LevSMS code: zee78900/levsms @ 7293614 · live deploy @32
Workspace repo: zee78900/hookstreet-workspace · branch master
Working dir: C:\Users\ztrei\OneDrive\2. Hook Street\05. 2026 BH
Sheet snapshot captured 2026-05-26 · 10 tabs · 1,121 total data rows