System documentation
Mostly, the Unlikely Professionals operations platform, as it runs in August 2026: Supabase as the record, unlikely-api (FastAPI + ARQ) doing the work, the Entirely portal at unlikely.engineer where people act. This replaces the February 2026 SmartSuite-era model (11 tables, Zapier, Drive, Stripe, Chatwoot, Kulu), none of which survives.
Overview
Data of record: Supabase (cloud Postgres; sole source of truth since 2026-04-09; SmartSuite retired 2026-07-28, never to be reactivated). API: unlikely-api (FastAPI v2, 63 routers) with an ARQ worker and scheduler on the VPS, Redis for the queue. Portal: Entirely v2 at unlikely.engineer (7 roles plus client and field). Files: /data/projects on the VPS (60 GB, 39,135 registered files). Field input: unlikely.pics, unlikely.pl, Kilroy on Telegram. Outbound: Gmail (operations@unlikely.pro), Telnyx SMS, portal notifications. Public: unlikely.report.
Design principles
1 · Every column earns its place
A column exists because a service reads or writes it; legacy SmartSuite attributes nothing reads stay inside raw_data only.
2 · No orphan fields (with known exceptions)
products.division / product_name are NULL on every row (code derives division from the code prefix); cert_packages is dormant; projects.stripe_invoice_id and site_visits.calendar_event_id outlived their integrations. Listed here so they get cleaned up, not rediscovered.
3 · Computation lives in services, not the database
Invoice math in invoice_service.build_invoice_context (the portal never shows a stored total); cert readiness in the 14-check cert_validate; outstanding items in needs_engine; the nightly stuck-project scan in pipeline_shepherd.
4 · One write path
All Supabase writes go through the write service (never direct); field input only through unlikely.pics, unlikely.pl and Kilroy; outbound only through Gmail, Telnyx, portal notifications. Nothing outbound without explicit permission.
5 · Audit trail by default
audit_log.db, write_guard_audit.db, project_status_events, per-record cert_invoice_state history (drafted / approved / sent, version), email_tracking.db delivery ledger (per-recipient tokens, opens, clicks, downloads), comm_log, cert_access_log.
Tables at a glance
Supabase public schema, the tables that matter operationally (there are about 40 tables and views in total, plus SQLite side stores under /data/portal-auth). Column counts and row counts read live on 2026-08-21.
| Table | Purpose today |
|---|---|
projects | 6,035 rows, 55 columns. One row per project; status, cert/invoice state, permit, jurisdiction, brand, review type, hold and triage overlays. |
sow_lines | 1,983 rows. One row per product on a project: permitted qty (PSoW), as-built qty (ABSoW), inspected, post_production, production days. |
products | 55 rows. Catalog with unit_price; behavior (add-ons, parents, specs, production days) lives in config.py. |
accounts | 12 rows (JES Baltimore, Manassas, Richmond, Triage, Virginia Beach, Roanoke, West Virginia; Groundworks North Haven, Corporate, Hooksett; Unlikely Professionals; Founders Waterproofing). Routing defaults in config. |
contacts | 94 frozen rows. Live people are portal users (portal_users.db, 34 users) and the config routing maps. |
site_visits | 928 rows, 16 columns. Visit status, purpose, timing, assigned tech, requested and scheduled dates. |
project_files | 39,135 rows. Every file under /data/projects: category, source, sha256, GPS. Replaces Field Submissions. |
project_needs | Needs engine (since 2026-08-08): pier_logs, photos, documents, hold_followup, cert_blockers; first/last seen, notify count, resolved, dismissed. Replaces Crew Deliverable Requests. |
rfis | 1,515 rows (4 open). Manual RFIs remain; automatic creation retired. |
comm_log | 2,878 rows. Channel Portal / Email / Internal; types Escalation, Cert Delivery, Status Update, General, Scheduling. |
project_status_events | Every status change (request, cert, invoice, hold, triage, work lane), since migration 031. |
cert_access_log | 8,419 rows. One per hit on unlikely.report (cert, index, landing, 404, gone, cert_pdf). |
cert_packages | Dormant (4 rows from Feb 2026). Cert state now lives in cert_invoice_state JSON, email_tracking.db and projects.cert_status / cert_public_url. |
tracker_permits | Regional open-permits tracker (JES workbook uploads; overdues, closures). |
ppdr_staging | Desk Review Prep staging rows for post-production desk reviews. |
invoice_ledger | Invoice number allocation (v2 format built 2026-08-10, cutover pending). |
document_extractions | Fleet document-extraction results (migration 033), Sonnet 5 since 2026-08-10; OCR queue. |
absow_proposals | Claude-generated as-built proposals for desk reviews. |
pierlog_discrepancies | Pier log parse discrepancies (type, counts). |
What happened to the eleven SmartSuite tables
| Then | Now |
|---|---|
| Projects (59 fields) | projects (55 columns); formulas and rollups moved into services |
| SOW Lines (34) | sow_lines (20 columns) + sow_gate.db as-built confirmations |
| Products (16) | products (11 columns) + config PRODUCT_CATALOG / ADDON_TRIGGERS / PARENT_SERVICE_MAP / PRODUCT_SPEC_REGISTRY |
| Accounts (14) | accounts (12 rows, title only) + config CERT_ROUTES, INVOICE_ROUTES, ACCOUNT_CODES, ACCOUNT_PROJECT_PREFIX, INVOICE_BRANCH_CODES |
| Contacts (12) | contacts (94 frozen rows) + portal_users.db + config routing maps |
| Site Visits (28) | site_visits (16 columns) + field_inspections.db open_inspections |
| Field Submissions (14) | retired; project_files + the upload routes |
| Crew Deliverable Requests (22) | retired; project_needs (needs engine, since 2026-08-08) |
| RFIs (20) | rfis (nearly all Resolved) + portal project_messages type=rfi; automatic RFIs retired |
| Cert Packages (29) | dormant; cert_invoice_state JSON + email_tracking.db + projects.cert_status / cert_public_url + CERTS files |
| Communication Log (12) | comm_log + chat.db + conversation_log.db |
Key columns
The columns people actually query. Full DDL lives in /opt/unlikely-api/migrations.
projects
| Group | Columns |
|---|---|
| Identity | id, smartsuite_id (24-char hex; the key every other table uses), project_id (BAL-/MAN-/RIC-/NOR-/HKS-/VAB-/ROA-/WVA-/UPR-/FWP-#### from 9000), title, account_ss_id, branch_code, customer_number (retired 8/11), bc_job_number |
| Site and permit | address, jurisdiction (AHJ), state, permit_number, permit_issue_date, permit_expiration_date, code_cycle, property_owner, project_type (Residential / Commercial) |
| Pipeline | request_status (8 values), on_hold, hold_since, hold_follow_up_date / note, needs_followup, review_type (Field Inspection / Desk Review), work_lane (production / closeout), triage_* (status, assigned_date, notes, originating_branch, review_type, blocked_reason), declined_* |
| Cert and invoice | brand (blackhouse / unlikely), cert_status (Not Started / Draft / Approved), cert_public_url, inspection_date, production_days, invoice_number, invoice_status (Not Invoiced / Sent / Paid), invoice_total, date_invoice_sent |
| Scope | scope_changed, scope_change_notes, absow_reconciled_at / by, prior_cert_project_id |
| Legacy | stripe_invoice_id (unused), drive_link, raw_data, ss_created_at, ss_updated_at, synced_at |
| Derived at read time | permit expiry (cert check 4), inspection coverage (checks 1 / 3), open RFIs (check 2), cert blockers (all 14 checks), visit rollups, invoice totals |
sow_lines
| Group | Columns |
|---|---|
| Identity | id, smartsuite_id, project_ss_id, product_ss_id, title |
| Quantities | quantity (PSoW), quantity_unit, as_built_qty (ABSoW), inspected, inspected_date, notes (text + spec JSON) |
| Billing | post_production (2x), production_days, production_days_confirmed, production_days_source (system_calc / owner_manual / dustin_override) |
| Legacy slugs in raw_data | SOW_STATUS, SOW_CONFIRMED, SOW_MODIFIED, SOW_INSPECTION_METHOD, SOW_INSPECTION_TIMING, anchor spec fields |
site_visits
| Group | Columns |
|---|---|
| Identity | id, smartsuite_id, project_ss_id, title |
| Schedule | requested_date, scheduled_date, assigned_tech |
| Outcome | visit_status (Scheduled / En Route / On Site / Completed / Cancelled / No-Show), visit_purpose (Initial Inspection / Follow-Up / Re-Insp / Add Scope / Post-Production Inspection), inspection_timing (In Production / Post Production), visit_outcome (free text) |
| Legacy | calendar_event_id, raw_data |
| Side stores | missed_appointment_flags → ADM-MISS; failed_inspection_flags; open_inspections (opened / suspended / completed) |
project_files
| Group | Columns |
|---|---|
| Identity | id, project_id (= smartsuite_id), filename, category (PHOTOS / PIERLOGS / PERMITS / PERMIT_PACKAGE / PLANS / CERTS / INVOICES / OTHER) |
| Provenance | source (upload, intake_upload, cert_generator, invoice_generator, archive_*, whatsapp-rob historical), source_path, mime_type, size_bytes, sha256, gps_lat / gps_lon, created_at, linked_at |
project_needs
| Group | Columns |
|---|---|
| Need | project_ss_id, need_type (pier_logs / photos / documents / hold_followup / cert_blockers), detail |
| Lifecycle | first_seen, last_seen, notify_count, last_notified_at, resolved_at, resolved_via, dismissed_at / by / note |
comm_log
| Group | Columns |
|---|---|
| Message | linked_project, sent_at, direction (Inbound / Outbound / Internal), channel (Portal / Email / Internal), message_type (Escalation / Cert Delivery / Status Update / General / Scheduling), from_field, to_field, subject, content |
Product catalog
55 products across 8 service divisions plus add-ons, admin fees and the production-day pseudo-product; 44 are billable, 11 are $0 documentation sub-components. The catalog is what we inspect; the county narrows it (Arlington = special inspections only; retaining walls everywhere). Prices read from the products table on 2026-08-21.
Dependencies (code-enforced)
| Parent | Auto-added | Rule |
|---|---|---|
| UND-PUSH, UND-HELI | ADD-BKFL | always (ADDON_TRIGGERS) |
| UND-SLAB | ADD-SLAB | always |
| ANC-WALL, ANC-CHAN | ADD-BKFL | always |
| WTR-BSMT | ADD-SLAB + ADD-WSEAL | always; qty = WTR-BGUT lin ft; exception = confirmed-not-built line |
| SUP-COL | SUP-FTR-CIP | invoice-time auto-add when no SUP-FTR-* line exists; footer specs in SOW notes (24x24x24, 12/12 concrete / aggregate) |
| FND-ABC, FND-AREA, FND-FTR, FND-WALL | ADD-BKFL | invoice-time unless FND-BKFL / RTW-BKFL present |
| WTR sub-components | WTR-BSMT or WTR-CRWL parent | parser / write service auto-create (WTR-BGUT = basement signal) |
| ENC sub-components | ENC-SYS parent | auto-create |
UND · Underpinning 3
Production days and pier logs apply to all three. Default manufacturer Supportworks.
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
UND-HELI | Helical Pile | pier | $400 | yes | adds ADD-BKFL; pier log required |
UND-PUSH | Push Pier | pier | $400 | yes | adds ADD-BKFL; pier log required |
UND-SLAB | Slab Pier | pier | $400 | yes | adds ADD-SLAB; pier log required |
ANC · Anchors 2
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
ANC-CHAN | Channel Anchor | channel | $400 | yes | adds ADD-BKFL |
ANC-WALL | Wall Anchor | anchor | $400 | yes | adds ADD-BKFL |
BRC · Bracing 3
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
BRC-CFRP | CFRP Strap | strap | $400 | yes | |
BRC-PIN | Wall Pin | pin | $400 | no production days | |
BRC-STEEL | Steel Brace | brace | $400 | yes |
SUP · Support 10
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
SUP-BAND | Band Board | section | $300 | ||
SUP-COL | Adjustable Column | column | $400 | SUP-FTR-CIP auto-added at invoice when no footer line; footer specs in SOW notes | |
SUP-FLOOR | Subfloor | area | $300 | ||
SUP-FTR-CIP | Pier Footer (CIP) | footer | $300 | ||
SUP-FTR-PRE | Pier Footer (Precast) | footer | $300 | ||
SUP-JOIST | Floor Joist | joist | $300 | ||
SUP-LBEAM | Lumber Beam | beam | $300 | ||
SUP-RIM | Rim Joist | section | $300 | ||
SUP-SBEAM | Steel Beam | beam | $400 | ||
SUP-SILL | Sill Plate | section | $300 |
FND · Foundation 12
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
FND-ABC | ABC Foundation | component | $450 | invoice auto-adds ADD-BKFL unless FND-BKFL / RTW-BKFL present | |
FND-AREA | Areaway | areaway | $300 | invoice auto-adds ADD-BKFL unless FND-BKFL / RTW-BKFL present | |
FND-BKFL | Foundation Backfill | area | $300 | ||
FND-FTR | Continuous Footer | footer | $300 | invoice auto-adds ADD-BKFL unless FND-BKFL / RTW-BKFL present | |
FND-GSLAB | Ground Slab | slab | $300 | ||
FND-PFTR | Pier Footer | footer | $300 | ||
FND-PORCH | Porch | porch | $300 | ||
FND-SSLAB | Structural Slab | slab | $300 | ||
FND-STOOP | Stoop | stoop | $300 | ||
FND-WALL | Foundation Wall | wall | $300 | invoice auto-adds ADD-BKFL unless FND-BKFL / RTW-BKFL present | |
FND-WWELL | Window Well | window well | $0 | documentation only; $0: documentation line, skipped on invoices | |
FND-XWTR | Exterior Waterproofing | area | $300 |
WTR · Water Management 9
Two billable parents (WTR-BSMT, WTR-CRWL); seven $0 sub-components document what was installed and require a parent line (WTR-BGUT is the definitive basement signal).
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
WTR-BGUT | Basement Gutter | gutter | $0 | sub-component, requires parent WTR-BSMT; $0: documentation line, skipped on invoices | |
WTR-BSMT | Basement Water Management | system | $300 | adds ADD-SLAB + ADD-WSEAL (qty = WTR-BGUT lin ft); parent for WTR-BGUT | |
WTR-CDRAIN | CrawlDrain | drain | $0 | sub-component, requires parent WTR-CRWL; $0: documentation line, skipped on invoices | |
WTR-CRWL | Crawlspace Water Management | system | $300 | parent for crawlspace sub-components | |
WTR-DISC | Discharge Line | line | $0 | sub-component, requires parent WTR-CRWL; $0: documentation line, skipped on invoices | |
WTR-DTIL | Drain Tile | tile | $0 | sub-component, requires parent WTR-CRWL; $0: documentation line, skipped on invoices | |
WTR-LAT | Lateral Line | line | $0 | sub-component, requires parent WTR-CRWL; $0: documentation line, skipped on invoices | |
WTR-SPIT | Sump Pit | pit | $0 | sub-component, requires parent WTR-CRWL; $0: documentation line, skipped on invoices | |
WTR-SUMP | Sump Pump | pump | $0 | sub-component, requires parent WTR-CRWL; $0: documentation line, skipped on invoices |
ENC · Encapsulation 4
ENC-SYS is the billable parent; three $0 sub-components require it.
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
ENC-CSEAL | CrawlSeal | seal | $0 | sub-component, requires parent ENC-SYS; $0: documentation line, skipped on invoices | |
ENC-DEHUM | Dehumidifier | unit | $0 | sub-component, requires parent ENC-SYS; $0: documentation line, skipped on invoices | |
ENC-RINS | Rigid Insulation | panel | $0 | sub-component, requires parent ENC-SYS; $0: documentation line, skipped on invoices | |
ENC-SYS | Encapsulation System | system | $300 | parent for ENC-CSEAL / DEHUM / RINS |
RTW · Retaining Walls 6
All six at $450. Retaining walls are inspected everywhere we work.
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
RTW-BKFL | Retaining Wall Backfill | area | $450 | ||
RTW-FTR | Retaining Wall Footing | footer | $450 | ||
RTW-RAIL | Railing | railing | $450 | ||
RTW-SOIL | Soil Bearing | test | $450 | ||
RTW-WALL | Retaining Wall | wall | $450 | ||
RTW-WTR | Retaining Wall Waterproofing | area | $450 |
ADD · Add-ons 3
Auto-attached by ADDON_TRIGGERS; quantity follows the as-built.
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
ADD-BKFL | Backfill | location | $300 | ||
ADD-SLAB | Slab Patch/Repair | patch | $300 | lin ft when triggered by WTR-BSMT | |
ADD-WSEAL | WallSeal | membrane | $300 | lin ft when triggered by WTR-BSMT |
ADM · Administrative 2
Administrative fees, qty 1, never doubled.
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
ADM-MISS | Missed Appointment | fee | $400 | missed appointment; consolidated into one line with dates; never 2x | |
ADM-RUSH | Emergency Service | fee | $400 | added at intake when inspection is under 24 h out; never 2x |
PRD · Production 1
Billing pseudo-product; not in config PRODUCT_CATALOG.
| Code | Product | Unit | Unit price | Production days | Notes |
|---|---|---|---|---|---|
PRD-DAY | Production Day | day | $600 | auto-inserted from production days (UND/ANC/BRC only; min 1, max 12); 2x when post-production |
Integrations and channels
What replaced the seven February integrations, and the channels people actually hear from.
Cert generator (unlikely-api)
/cert-gen/* and the portal draft button. Reads projects, sow_lines, products, accounts, site_visits, project_files and the files under /data/projects/{id}/. Writes PDF + HTML to CERTS/, registers them, sets cert_public_url (unlikely.report), updates cert_status. Jinja2 → Playwright/Chromium; pypdf appends Anne Arundel 210/215/240, Montgomery SIRC, Prince William, Fairfax, Arlington, Stamford CT, NC Appendix G.
Portal intake, action center and chat
Entirely portal at unlikely.engineer: Intake Wizard, intake requests, schedule-change requests, holding pool, cert/invoice workbench, review queue, payments, Outstanding Items, custom WebSocket chat and notifications. Writes projects, sow_lines, site_visits, comm_log, project_files; chat and notifications in SQLite.
Kilroy field agent + unlikely.pics / unlikely.pl
Kilroy (Hermes, Telegram; Dustin and Darius only) calls /whatsapp/inspection/* and /field-media/upload. Photos and pier logs enter only through the per-stop unlikely.pics/s/{PROJECT-ID} link (GPS preserved, Vision proposal) and unlikely.pl (pier log parse). Writes site_visits (arrival, completion, No-Show), sow_lines (as-built, inspected), comm_log notes, project_files. Outbound field messages: WhatsApp hook (down since 2026-07-27) → Kilroy Telegram → Telnyx SMS.
Payments: remittance inbox, reconciliation, Revolut
Invoices are PDFs emailed to Invoices@groundworks.com with branch CC. Remittance emails are polled (Tue/Thu afternoons), parsed, matched by the reconciliation scanner (7:15 AM ET) and smart reconciliation (10:00 AM ET; HIGH auto-applies and closes, MEDIUM parks, $5K+ always reviewed). Revolut API for the bank side. Payments page and RUBRIC Money tab show AR aging and collected revenue.
Calendar (Supabase only)
/calendar/* and the portal calendar (field and PPDR variants, drag-and-drop) read and write site_visits. Branch schedulers get a 6:30 AM ET SMS snapshot; the field inspector gets the day's schedule at 6:00 AM ET (Kilroy) with the API push defaulting to 8:00 AM.
File storage (VPS filesystem)
/data/projects/{record_id}/{CERTS,PERMITS,PLANS,PHOTOS,PIERLOGS,INVOICES,OTHER} tracked in project_files; image optimization and EXIF GPS capture on upload; public cert hosting at unlikely.report. Google Drive is a read-only cold archive; Dropbox, blkhse Gmail and Xero are historical archives fuzzy-matched to projects.
Scheduler automation (ARQ)
Eastern time. Interval: needs_watcher hourly, visit_completion_prompt 10 min (8 AM to 8 PM weekdays), media_auto_filer 30 min, remittance_inbox hourly Tue/Thu afternoons, bounce_scanner 2 h, document extraction hourly, OCR 30 min, ops_agent_tick 15 min, dead-letter 5 min. Daily: morning_ops 6:15, status_advancement 6:30, branch_schedule_morning_snapshot 6:30, pierlog_request 6:45, reconciliation_scan 7:15, pierlog_morning_escalation 7:15, closeout_burndown 7:20, daily_schedule 8:00, needs_digest Mon/Thu 8:00 (preview), financial_recon 8:00, smart_reconciliation 10:00, inspection_reminder 17:00, inspection_escalation 18:00, pierlog_followup 18:00, visit_eod_recap 18:30, pipeline_shepherd 2:15 weekdays, monthly_dispatch_draft 5:00 (acts on the last day of the month), trash_purge 3:00, knowledge_keeper Sun 1:00. RFI auto-escalation cron disabled 2026-08-08.
A\ C Code
Permit parser at intake and on Reparse; fleet document extraction (Sonnet 5); Vision photo classification (in-situ gate, quantity proposals, media auto-filer); ABSoW proposals; cert pre-review agent; Guy Friday in the portal (Opus for owner/admin, Sonnet for staff, SQL engine, charts).
Google Maps / Routes / Address Validation
USPS-grade address standardization, geocoding, AHJ (jurisdiction) lookup at intake; traffic-aware drive times at /ops/drive-time.
Channels
| Channel | Used for |
|---|---|
| Email (Gmail, operations@unlikely.pro) | Certs, invoices, needs digest, notifications; remittance inbox in. |
| Telnyx SMS (+1 202 989 1100) | Branch scheduler snapshot 6:30 AM, pier-log request chain, field fallback; 600-char chunks, 15/recipient/hour cap, opt-out honored. |
| Kilroy Telegram | Dustin and Darius only: daily field schedule, EOD recap, briefings, photo proposals, permit-expiry check. |
| Portal notifications + chat | In-app feed, WebSocket chat, escalation threads; consolidation, DND, offline fallback via notification_router. |
| unlikely.pics | Per-stop and permanent photo upload links; Vision proposals; closeout. |
| unlikely.pl | Pier log upload (/log/{pin}); Vision parse; crew lookup by permit + job number or address. |
| unlikely.report | Public cert view with Download PDF; per-customer index; hits logged. |
| WhatsApp hook (dormant) | First link in the field-message chain; dead since Rob/OpenClaw shut down 2026-07-27. |
Contact and cert routing
Deterministic per-account maps in config.py (CERT_ROUTES, INVOICE_ROUTES, BRANCH_SCHEDULERS, ESCALATION_ROUTING, BRANCH_DIGEST_RECIPIENTS). Names as of 2026-08-21; Stephaney's tiers fall to Dustin after 2026-08-31.
Who gets what
| Event | Recipient | Channel | Fallback / notes |
|---|---|---|---|
| Pier log request | Branch scheduler (Baltimore Julia Marketis; Manassas Zoe Kelley; New Haven Kai Perkins) [VERIFY: Richmond, VB, Roanoke, WV have no SMS scheduler entry] | Telnyx SMS 6:45 AM ET with upload link | 6 PM follow-up SMS; 7:15 AM next-day escalation SMS to the same scheduler |
| Photos / permits / plans / hold decision | Branch digest contact (Baltimore Julia + Nicole; Manassas Zoe + Lily; New Haven Kai; Virginia Beach Ronnie Stamp; default Stephaney until 8/31 then Dustin) | Email digest Mon/Thu 8 AM ET with no-login upload links | PREVIEW MODE: digests go to Dustin only until he flips it live |
| RFI sent (manual) | Branch scheduler tier of ESCALATION_ROUTING, else active portal schedulers for the branch | Portal notification (email optional) | Office manager at Day 3, GM at Day 5 if the escalation scan is run by hand |
| RFI escalation | Office manager → GM per account (Baltimore Nicole Lovo, no GM; Manassas Lily Jacobs → James Carey; North Haven Shejdie Childs; Hooksett Jeff Corso; Richmond / Roanoke / WV / Triage Stephaney until 8/31 then Dustin; VB scheduler Ronnie) | Portal notification, email_pending flag at Day 5 | Daily cron disabled since 2026-08-08; POST /portal/rfi/escalation-scan only |
| Invoice sent | Invoices@groundworks.com (dSilo ingests) | Email from operations@unlikely.pro | Branch CC: Nicole (BALT), Lily (MANA), Jo Woodward (RICH), Kai (NHAV, Corporate), Jeff Corso (Hooksett), Candice Yi (VB); Founders Waterproofing → Tyler Rasmussen; PPDR and triage projects bill the originating branch |
| Cert package delivered | CERT_ROUTES by account: Baltimore Julia + Nicole (+ ipbpri@aacounty.org for Anne Arundel); Manassas Permits.Inspections + Madison Carter + Zoe Kelley, CC Lily; Richmond Stephaney; North Haven / Corporate Kai; Hooksett Jeff Corso; Founders WP permits@; Unlikely Pro per-send recipient | Email, per-recipient tracked copies, cert link on unlikely.report | PPDR desk reviews and any JES project completed on or before 2025-12-31 route to JES Triage (Stephaney TO, Permits.Inspections CC); VB adds Ronnie Stamp CC until 9/1 then Ronnie alone; legacy archived certs are served from the portal archive, not re-sent |
| Schedule confirmation | Branch schedulers (BRANCH_SCHEDULERS) | SMS snapshot 6:30 AM ET weekdays (today + tomorrow) | Schedule changes requested and approved in the portal; Darius gets the daily schedule at 6:00 AM ET via Kilroy (API push 8:00 AM) |
Certifier and jurisdiction forms
| Jurisdiction | Forms auto-appended | Certifier |
|---|---|---|
| Anne Arundel MD | Forms 210 Footing, 215 Backfill, 240 Slab (240 only with slab scope) | Charles Diehl, AIA |
| Montgomery MD | Residential Special Inspections (SIRC) form | Charles Diehl, AIA |
| Prince William VA | Building Inspection form | John C. Valerio, PE |
| Fairfax VA | Building, Foundation, Retaining Wall | John C. Valerio, PE |
| Arlington VA | Statement of Special Inspections | John C. Valerio, PE |
| Stamford CT | Code Statement + Final Statement of Special Inspections | John C. Valerio, PE |
| North Carolina (statewide) | Appendix G Design Professional Inspection form (field visits only) | John C. Valerio, PE |
| All other MD | none | Valerio, PE (MD #16657) |
| All other VA | none | Valerio, PE (VA #044764) |
| All other CT | none | Valerio, PE (CT #15080) |
| CA CO FL GA IL MI NH NY OH PA RI SC | none | Valerio, PE (licensed, inert until a project arrives) |
Lifecycles
Project (8 statuses + flags), site visit (6, unchanged enum), SOW line, cert, invoice, triage.
Project lifecycle
| Status | Entry | What happens | Exit |
|---|---|---|---|
| Intake | Intake wizard submission, intake request approval, or email recovery | Permit parse, address validation, jurisdiction and certifier routing, SOW lines drafted | Approved → Scheduled |
| Scheduled | Site visit row with a date | Appears on the field and branch schedules; pier-log link minted for underpinning stops | Visit date arrives / arrival logged |
| In Progress | status_advancement 6:30 AM on the visit day, or Kilroy arrival log | Inspection, photos and pier logs through unlikely.pics, ABSoW and inspected status, field notes to comm_log | All visits Completed (or reset to Scheduled with needs_return_visit) |
| Field Complete | All visits Completed | Auto-validation 10-point checklist; blockers recorded as needs; SLA clock (3 business days) | Validation passes |
| Ready for Cert | Auto-validation PASS, cert_status Draft | Admin drafts cert (version N), pre-review agent, QA guardrails, confidence routing | Cert approved |
| Certified | Cert Approved and sent | Delivery through /cert/deliver after Dustin reviews the PDF; per-recipient tracking; invoice drafted | Invoice sent |
| Invoiced | Invoice emailed | Reconciliation scanner matches remittances; shepherd flags unpaid at 30 and 60 days | Payment matched |
| Closed | Payment matched (HIGH tier) or owner close | Terminal; owner may reopen |
Flags and overlays
| Flag / overlay | Meaning |
|---|---|
| on_hold | Holding Pool: hold reason, hold since, follow-up date, stale close-out, convert to desk review; shepherd flags > 30 d |
| cancelled | Cancel Requests; legacy rows may carry the old Cancelled status |
| needs_return_visit | Set when a visit date passes without completion; shepherd auto-clears after 14 d |
| needs_followup | Owner to-do |
| review_type | Field Inspection / Desk Review (selects the cert document set and 2x pricing) |
| work_lane | production / closeout (migration 042, 2026-08-18) |
| triage_status | Received / In Review / Blocked / Complete for the pre-2026 backlog (completion ≤ 2025-12-31) |
Site visit lifecycle
| Status | Entry | Exit |
|---|---|---|
| Scheduled | Visit row created with date and assigned tech | Arrival logged, or day passes (project resets to Scheduled if not completed) |
| En Route | Optional, rarely used | Arrival |
| On Site | Kilroy arrival log with photo | Completion |
| Completed | Completion call, idle completion prompt, or EOD recap reply | |
| Cancelled | Office cancels before the visit | |
| No-Show | Tech reports no access; missed-appointment flag; ADM-MISS trip charge |
SOW line
| Field | Values | Meaning |
|---|---|---|
| SOW status | Draft, Confirmed | Draft from permit parse; Confirmed after the SOW gate (PSoW vs ABSoW) |
| Inspection status | Not Inspected, Partially Inspected, Inspected | Set from the field; 100% coverage (excluding ADM / PRD) required by auto-validation |
| Modified / as-built qty | boolean + number | As-built differs from permitted; ABSoW drives cert and invoice |
| Timing / method | In Production or Post Production; In Situ or Desk Review | Post Production bills 2x; per-line post_production flag |
| Production days | number | Only UND / ANC / BRC generate production days |
Escalations
Only the chains that actually run. The February crew-deliverable ladder (T+6h/24h/48h/72h) and the RFI priority timers do not exist in code.
Pier log chain
6:45 AM ET request SMS with upload link → 6:00 PM follow-up → 7:15 AM next-day escalation SMS to the branch scheduler; idempotent per project and date; Baltimore caps at office manager. Cert blocked by validation while logs are missing.
Outstanding items (needs engine)
Photos, permits/plans, hold follow-up (30 d), cert blockers computed hourly; watcher auto-resolves and notifies Dustin + Jacob; Mon/Thu 8 AM digest (preview mode); waive via Outstanding Items (owner/admin).
RFI ladder (manual RFIs, scan off cron)
Day 1 portal reminder; Day 3 Escalated + office manager; Day 5 GM + email_pending; Day 7+ every 2 business days. Shepherd reports RFIs aging 3 to 7 days (info) and 7+ (critical).
Permit expiration
Shepherd: ≤ 30 d warning, ≤ 14 d critical, expired critical (owner alerts + branch digest); cert_validate check 4 blocks generation; intake soft-flags; no override or exemption path; no auto-RFI to the client.
Field day
8:00 AM schedule (Kilroy 6:00) → 5:00 PM open-visit reminder → 6:00 PM escalation → 6:30 PM EOD recap; completion prompts every 10 min.
Money and holds
Unpaid 30 to 59 days notify owner; 60+ escalate; on hold over 30 days follow-up; cert approved but undelivered after 3 business days.
Cert versioning
The Revision / Major Revision / Addendum scheme (v1.1, v2.0, v1.0-A, Superseded) never shipped. What runs:
Version number
Integer per portal draft: v1, v2, v3 … (API default "1.0" when called directly; early certs used 1.0 / 1.1 / 2.0). Filename {address}_{project_id}_CertPackage_v{N}.pdf.
Which file is current
Newest PDF by mtime; /cert-gen/pdf/{id} serves it; cert_public_url on unlikely.report always shows the current package; prior PDFs remain on disk.
Resend labelling
Subject "{address} - Permit Number {permit}" plus "UPDATED (vN)" where N is the send count from CERTS/sent_log.json; body notes it is an updated version; comm_log entry "Cert Delivered [UPDATE], v{cert version} (send #N)".
Review rule
Dustin sees every regenerated PDF before any resend. No Superseded / Void status, no Addendum form; a regenerated package re-covers all current SOW lines.
Reporting
The nineteen SmartSuite views are gone. Where each need is answered today:
Command Center / Workbench
Owner pipeline + action queue; stage filters; cert drafting aging; ready for cert.
Branch Dashboard
Per-branch aging > 30 d, open RFIs, RFIs aging > 3 d, inspections this month, avg days to close.
Outstanding Items + Pier Log Tracker
Needs engine queue; per-project pier-log status and age.
Owner Analytics + /portal/reporting
Revenue snapshot and monthly breakdown; 12 endpoints: revenue, revenue/trend, sla-compliance, cert-velocity, branch-comparison, pipeline-snapshot, invoicing-gap, production-accuracy, scope-complexity, reinspection-rates, certifier-workload, seasonal-patterns.
Payments · Smart Recon · RUBRIC Money
Invoice ledger, AR aging by branch, collected revenue since inception ($2.96M / 2,395 invoices as of 8/08), parked matches.
Delivery Ledger · Cert Board
Per-recipient sends, opens, link clicks, downloads; download log with version.
Permit expiry
/ops/permit-expiry, shepherd permit rules, PermitTimelineChip on the project page.
Tracker / The Backlog / Missing Certs
Regional open-permits tracker (mirror at unlikely.ltd), missing-certs sweep, desk-review prep.
Pipeline Shepherd + firm stats
2:15 AM weekday JSON reports at /data/shepherd; firm stats (projects, site visits, jurisdictions served) at /data/firm-stats/stats.json feeding unlikely.pro and unlikely.place.
Guy Friday + RUBRIC dashboard
SQL engine, Tufte charts, user-activity lookups (owner); RUBRIC tabs Pulse / Health / Outbox / Money / Queues.