Entirely v2 uses a simplified 5-stage frontend model — Intake, Scheduled, Field Complete, Processing, Closed — backed by 8 granular backend statuses. All reads, writes, and creates route through Supabase as the sole source of truth. This document covers every status, every transition, every trigger, the triage overlay, the Regional Open Permits tracker, and the full automation chain.
The primary lifecycle of a project, from intake through close. Stored in
the Supabase projects table (status column). Eight linear statuses plus three boolean
flags that can attach to any active status. Supabase is the sole source of truth for all CRUD operations.
The Entirely v2 UI consolidates 8 backend statuses into 5 visible stages. This reduces cognitive load for operators while preserving full granularity on the backend.
| Status | Value ID | Who Advances | Trigger | Auto? |
|---|---|---|---|---|
| Intake | go210 | Portal / Admin | Project created via portal intake, PMS push, or triage new-project path | Manual |
| Scheduled | jKK2p | Scheduler | Site visit date assigned in Day View | Manual |
| In Progress | 0Xf2F | Inspector | Site visit started (arrival recorded) | Semi-auto |
| Field Complete | 1yplc | Inspector / Ops | Visit marked complete; triggers 10-point auto-validation | Semi-auto |
| Pending RFI | DPBDX | System | RFI created on project; auto-resolves when last RFI closed → Ready for Cert (if validation passes) or Field Complete (fallback) | Auto |
| Ready for Cert | ogUeq | System | Cert validation passes all 10 checks | Auto |
| Certified | z1Tft | Ops Manager | Cert approved via confidence routing (Send Direct or Queue for Review) | Manual |
| Delivered | 8NyJk | System | Email Log Cert + invoice emailed to client. Backend column: Invoiced; Entirely labels this “Delivered” |
Auto |
| Closed | O1GXV | System / Admin | Payment confirmed via Smart Reconciliation (EFT remittance matching) | Auto |
Boolean flag. Freezes all auto-advance logic. Can be set on any active status. Set by Admin or Ops Manager. Remove to resume normal lifecycle.
Boolean flag. Terminal — project is permanently stopped. Set by Admin only. No further transitions are possible.
Boolean flag. Blocks auto-validation — a partial inspection is not field complete. Set by inspector or ops when a return visit is required before the project can advance.
Tracks the certification document lifecycle within a project. Stored in
the Supabase projects table (cert_status column).
| Status | Value ID | Who Sets | Trigger |
|---|---|---|---|
| Not Started | ffypR | System | Default value on project creation |
| Draft | pD6PP | System | Auto Cert package generated (Jinja2 HTML — served as link, recipient prints to PDF) |
| Approved | Ph6RR | Ops Manager | Cert reviewed and approved via confidence routing |
Tracks invoicing lifecycle. Payment confirmation via EFT reconciliation (Revolut for banking, Smart Recon for matching).
| Status | Value ID | Who Sets | Trigger |
|---|---|---|---|
| Not Invoiced | xmcJK | System | Default value |
| Sent | PtYwM | System | Auto Email Invoice emailed to client |
| Paid | 2GdlH | System | Auto Payment confirmed via Smart Reconciliation (EFT remittance matching) |
Triage is not a lifecycle stage — it is an overlay flag. The 45-day scan automatically assigns JES-account projects to triage when they have been in an active status for more than 45 days without advancing. Triage work happens on top of the existing project status; the underlying status does not change while a project is in triage.
Received — Auto-set by Pipeline Shepherd when the 45-day threshold is crossed, or manually assigned by admin. Project enters the triage team’s queue.
In Review — Triage team is actively processing the project. May involve desk review (document inventory, cert readiness check) or field review (scheduling a site visit).
Blocked — Missing documents prevent progress. Requires triage_blocked_reason: one of missing_plans, missing_permits, or missing_photos. Can return to In Review when the blocking item is resolved.
Complete — Triage work is finished. Triggers project advancement to Ready for Cert (if cert validation passes) or returns project to originating branch.
1. Last Inspection Date (rollup from site visits) — PRIMARY. The most recent site visit completion date. This is the preferred clock source because it reflects actual field activity.
2. Permit Issue Date — FALLBACK. Used when no site visits exist (e.g., desk-review-only projects or pre-inspection permits).
3. Record Creation Date — LAST RESORT. Used only when both inspection and permit dates are missing.
Clock reset: scheduling a future site visit with a date after today resets the 45-day clock. This allows teams to intentionally defer triage by confirming a return visit is planned.
| Day | Action |
|---|---|
| 30 – 44 | Auto Pipeline Shepherd warns scheduler via portal notification. Clock can still be reset by scheduling a site visit. |
| 45+ | Auto Log Auto-transfer to JES Triage account. Originating branch (BAL/MAN/RIC) recorded on the project for return routing. |
Project already exists in the system and has been inspected before. Triage team reviews the document inventory (plans, permits, photos, driving logs), uploads any missing files, and runs cert validation. If documents are missing, an RFI is auto-generated specifying what is needed.
An old permit that was never inspected. Two sub-types:
Complete → Ready for Cert — triage review is done, cert validation passes, project advances into the processing pipeline.
Return → Originating Branch — project is sent back to the originating JES branch (BAL/MAN/RIC) for additional field work or coordination. The triage flag is cleared.
The triage team sees zero financial data. Invoice amounts, payment status, and revenue metrics are not visible in the triage view. Invoices route to the originating branch, not the triage account.
The Taskforce Tracker manages JES’s overdue permit backlog across three regions. This is separate from triage — the tracker is JES’s external permit portfolio reconciliation tool. It tracks permits that JES has flagged as open, cross-references them against PMS and Entirely data, and manages the closure workflow.
BALT — Baltimore zone permits. JES Baltimore branch territory (Maryland).
MAN — Manassas zone permits. JES Manassas branch territory (Virginia).
RIC — Richmond zone permits. JES Richmond branch territory (Virginia).
CLOSED — Finalized permits. Records move here when the permit is confirmed closed by the jurisdiction. Tagged with _closed_date and _original_zone.
| Field | Description |
|---|---|
| project_id | Matched Entirely project ID (BAL-XXXX, MAN-XXXX) or null if unmatched |
| customer_name | Homeowner name from JES permit spreadsheet |
| physical_address | Property address |
| permit_number | Jurisdiction permit number (primary matching key) |
| project_type | Work type (underpinning, anchors, bracing, etc.) |
| days_on_bw | Days on JES “Board Watch” (days since permit opened) |
| cert_received | Whether UP has delivered a cert for this permit |
| final_inspection_date | Date of final jurisdiction inspection (if known) |
| notes | Free-form notes from triage or operations team |
Each tracker record is matched against two systems to build a complete picture:
cert_status_id, invoice_status_id from the historical PMS archive. Covers projects from 2018–2025 that may predate Entirely.project_status, cert_status, open_rfi_count from the active Supabase dataset. Cross-referenced by permit number, address, or customer name.Matching uses permit number as the primary key. When no permit match exists, fuzzy address matching (80% threshold) is used as a fallback.
The closure workflow processes JES-provided spreadsheets of closed permits:
POST /tracker/upload-closures._closed_date (today) and _original_zone (BALT/MAN/RIC) recorded.moved count, already_closed count, not_found count.
POST /tracker/sync triggers a manual refresh of PMS + Entirely data for all matched tracker records. This re-checks cert status, invoice status, and RFI counts against the latest data in both systems. Sync status and last-run timestamp are stored in the tracker_sync_status table.
The Taskforce Tracker is also fed by overdue-permit spreadsheets (POST /tracker/upload-overdue) which add new records to the active zones. County and jurisdiction names are normalized during import to prevent duplicates caused by formatting variations.
The complete end-to-end automation from field completion through payment. Human actions are shown in warm/khaki; system automation in blue.
The system continuously monitors projects and takes action automatically. These features reduce manual oversight, surface issues early, and keep projects moving through the lifecycle without waiting for someone to notice.
Auto When a project reaches Field Complete, the system automatically runs a 10-point validation checklist. If all checks pass, the project advances to Ready for Cert with no human intervention. If any check fails, an RFI is automatically generated and the project moves to Pending RFI until the issue is resolved.
Auto On validation PASS, the system also auto-calculates production days from SOW quantities (if not already set manually). Rules: 1 day per 6.5 piers, 1 per 10 anchors, 1 per 12 braces, 1 per 15 columns, 1 per FND component type, 1 base + 0.5 per 50 LF drain, 1 base + 0.5 per 500 SF encapsulation, 1 per 20 LF retaining wall. Manual overrides always take precedence.
A daily automated scan of all active projects, looking for anything stuck or
approaching a deadline. Runs once per day (idempotent) and reports via WhatsApp
and portal notifications. Reports stored at /data/shepherd/.
| Condition | Threshold | Action |
|---|---|---|
| Intake with no progress | > 3 days | Auto WhatsApp alert to Dustin |
| Scheduled with no site visit | > 2 days | Auto WhatsApp alert to Dustin |
| Field Complete with no validation | > 1 day | Auto Triggers auto-validation |
| Cert drafting overdue | > 3 biz days | Auto Portal notification to admin |
| Certified but not delivered | > 1 day | Auto Portal notification to admin |
| Unpaid invoice | > 30 days | Auto WhatsApp alert to Dustin |
| Unpaid invoice (escalation) | > 60 days | Auto Escalation notification |
| Project on hold | > 30 days | Auto Portal notification |
| RFI aging | > 3 days | Auto Portal notification |
| RFI aging (escalation) | > 7 days | Auto Escalation notification |
| Approaching triage threshold | Day 30–44 | Auto Warns scheduler via portal notification |
| Triage threshold reached | Day 45+ | Auto Log Auto-transfer to JES Triage |
Manual After Jacob drafts the cert and invoice, he chooses one of two paths based on confidence:
Guardrail The system automatically routes to review when: invoice total is $5,000 or more, the project is in Anne Arundel, Montgomery, or Prince William county (proprietary jurisdiction forms), or as-built scope (ABSoW) confirmation is incomplete (any SOW line using planned quantities instead of field-verified quantities).
Auto Before generating an invoice, the system validates ABSoW completeness. SOW lines modified in the field (PSoW ≠ ABSoW) must have confirmed as-built quantities — otherwise invoice generation is blocked. Unmodified lines without confirmation produce warnings but do not block. Admins can override with override_validation.
Confidence routing gives Jacob autonomy on straightforward packages while ensuring high-value or complex deliverables get a second set of eyes. If Dustin requests revisions, the package returns to Jacob for updates before re-submission.
Auto When a new project intake is submitted, the system automatically enriches it with:
Enrichment data is stored on the intake request and displayed to schedulers and admins in an expandable panel during intake review.
Auto When permits, plans, or drive logs are uploaded, the parser extracts structured data for all 9 product divisions:
auto_create_sow). Duplicate detection prevents re-creation on re-parse.If the permitted scope (PSoW) matches the as-built scope (ABSoW) — meaning no field changes — all parsed data flows straight through to cert generation and invoicing with zero manual intervention.
Auto When the field inspector reports as-built quantities via Rob (per-line or EOD batch closeout), the system writes to both Supabase (SOW_AS_BUILT_QTY) and the portal SOW Gate SQLite (absow_confirmations) in a single operation. This eliminates the need for a separate portal confirmation step — cert generation and invoice generation both read from SQLite first, Supabase as fallback.
If quantities differ from the permitted scope, the SOW_MODIFIED flag is set. Cert validation (Check 10: Scope Resolved) blocks certification until all modified lines have confirmed as-built quantities.
Auto When a payment arrives (EFT remittance or Revolut transaction), the smart matching engine scores each line item against open invoices:
Guardrail Payments ≥ $5,000 always require human confirmation regardless of match quality (caps at MEDIUM).
Remittance PDFs are auto-ingested from Gmail every 30 minutes (Mon–Sat, 1–9 PM ET). The inbox scanner searches for unprocessed emails, downloads attachments, parses line items (invoice number, amount, PINV reference), and feeds them into the matching engine. Processed emails are labeled to prevent duplicate processing.
The pipeline snapshot, analytics, and revenue reporting draw from three data sources, each with deduplication logic to prevent double-counting:
project_smartsuite_id; duplicates excluded from counts.The portal includes a real-time messaging system (WebSocket-based, SQLite persistence) that integrates with the project lifecycle:
The notification router delivers alerts across four channels: portal notification, email (Gmail API), WhatsApp, and SMS (Twilio). Per-user preferences control channel selection by urgency level. Features include offline email fallback (configurable delay), 2-minute consolidation window, and Do Not Disturb hours.
Auto When permits or plans are uploaded, Claude Vision extracts scope items and maps them to the product catalog. The parser automatically detects when sub-component products are present and injects the required parent service lines:
Parent services are the billable inspection products that appear on invoices. Sub-components are scope documentation items ($0) that record what was installed. Both must exist for cert generation and invoicing to work correctly.
Auto Every cert and invoice email includes a 1×1 transparent tracking pixel. When the recipient opens the email, the pixel fires and records:
Friday (the portal AI) operates in role-based voices and three escalating intelligence tiers:
query_data and describe_schema tools. Structured queries against Supabase with table/column allowlists. Null-aware filtering.run_sql executes read-only SQL via Supabase RPC (SELECT only, 5-second timeout, 100-row limit). Cross-system tools: get_pipeline_alerts, get_recon_status, precedent_search, pricing_intelligence.When a user asks Friday for a chart, graph, or visual, the response renders directly in the chat bubble. Three rendering tiers:
Friday operates in role-based voices: Internal (owner/admin, Opus, full tools including all 3 tiers), Staff (scheduler/GOA/assistant, Sonnet, Tier 1–2 query + Tufte/Recharts charts), Client-facing (professional tone, 4 safe tools only, no financial data, no visualizations), and Field (concise mobile, limited tools).
Cert and invoice delivery uses deterministic, account-based email routing. Each account has a fixed set of recipient addresses configured in Supabase. No manual email selection is required — the delivery endpoint looks up the project’s linked account and routes to the correct contacts automatically.
| Account | Routing Rule |
|---|---|
| JES (BAL/MAN/RIC) | Account-specific contact list; triage-eligible (45-day rule). Invoices always route to originating branch, never to the triage account. |
| Groundworks (CT) | Account-specific contact list |
| Unlikely Pro | Direct client contact; project-level override addresses supported |
| All Others | Account-specific contact list; fallback to project contact if no account contacts |
Email routing is configured per account in Supabase (contacts table, linked to accounts).
The /cert/deliver
endpoint resolves recipients at send time. Override addresses can be specified per-delivery
for one-off routing changes.