Session 39 — Entirely Ops Charts + Status Triggers Audit + 6-Phase Pipeline Optimization

What was built

  • Created status-triggers page for Entirely-v2 at entirely.unlikely.guide/status-triggers
    • 9 sections: Project Status, Cert Sub-Status, Invoice Sub-Status, Triage Pipeline, Regional Open Permits, Auto-Advance Chain, Pipeline Intelligence, Responsibility Matrix, Email Routing
    • Modeled after shared Mostly status-triggers page with Entirely-specific logic
  • Added triage pipeline + Regional Open Permits sections (07, 08) to operations-charts
  • Rewrote operations-charts sections 2-4 to reflect Entirely v2 architecture (unified cert+invoice, no GCal, no Stripe, Rob instead of Kulu)

Audit — Operations Charts

Full audit of entirely/operations-charts.html against live codebase:

  • Removed WeasyPrint PDF reference → “Jinja2 HTML · served as link”
  • Removed Stripe Webhook container → replaced with Rob (OpenClaw)
  • Removed Google Calendar references → “scheduling is fully internal”
  • Replaced kulu.la domain → unlikely.style
  • Rewrote payment tracking margin note → no Stripe, invoicing fully internal

Audit — Status Triggers

Full audit of entirely/status-triggers.html (12 fixes):

  • WeasyPrint → “Jinja2 HTML — served as link, recipient prints to PDF”
  • “calendar event created” → “Site visit date assigned in Day View”
  • Wrong value ID for Delivered (was 6yJZI) → 8NyJk (correct Invoiced ID)
  • 3x Stripe webhook references → Smart Reconciliation / EFT remittance
  • “Stripe for legacy” → “Smart Recon for matching”
  • “PDF created” in auto-advance SVG → “HTML generated”
  • Removed “Stripe webhooks handled immediately” sentence
  • query_stripe + query_calendar Friday tools → real tools (precedent_search, pricing_intelligence)
  • Added missing needs_return_visit flag to SVG diagram
  • “Calendar event creation” → “Site visit assignment in Day View”

Pages

  • /opt/workflow-guides/entirely/status-triggers.html — NEW (1518 lines)
  • /opt/workflow-guides/entirely/operations-charts.html — REWRITTEN + AUDITED (1695 lines)
  • /opt/workflow-guides/entirely/index.html — updated with status-triggers link

6-Phase PSoW→ABSoW Pipeline Optimization

Comprehensive audit of data flow from permit parsing through certification and invoicing. 1,262 lines across 13 files, commit a234eaa.

Phase 1: Parser Spec Gap Fix

Extended permit-parser SOW extraction prompt with structured specs for FND, WTR, ENC, RTW divisions. All 9 divisions now produce typed spec objects (fnd_specs, wtr_specs, enc_specs, rtw_specs). Also added BRC strap_width/tensile_strength. Keys match cert-data-service PRODUCT_SPEC_REGISTRY exactly.

Phase 2: Auto-Create SOW Lines

New auto_create_sow_lines() in document-parser-service. Parsed items → Supabase SOW lines with specs in notes JSON. Add-on triggers (UND→BKFL, WTR-BSMT→SLAB+WSEAL, SUP-COL→FTR). Duplicate detection. Opt-in via auto_create_sow parameter.

Phase 3: ABSoW Bridge (Checklist→SOW Gate)

Modified field-inspection-service update_absow() and eod_closeout() to write to BOTH Supabase SOW_AS_BUILT_QTY AND SOW Gate SQLite (absow_confirmations). Eliminates separate portal confirmation step. cert-data-service and invoice-service both read SQLite first.

Phase 4: Auto-Calculate Production Days

New calculate_production_days() in field-inspection-service. 8 division rules: UND ceil(piers/6.5), ANC ceil(anchors/10), BRC ceil(braces/12), SUP ceil(cols/15)+0.5/beam, FND 1/type, WTR 1+0.5/50LF, ENC 1+0.5/500SF, RTW 1/20LF. Wired into auto-validation-service PASS path and invoice-generator as Fallback 5.

Phase 5: Pre-Invoice Validation

New validate_invoice_readiness() in invoice-service. Blocks if modified SOW lines lack ABSoW; warns if coverage <100%. ABSoW completeness added as guardrail in confidence-routing-service (queues for owner review). override_validation parameter for admin bypass.

Phase 6: Drive Log Depth Association

Extended drive-log-parser with depth_readings per pier (PSI: 3ft/tube, torque: inferred from total depth), extension_sleeve boolean, installation_date. Updated cert-data-service sparklines to use depth-proportional X-axis when available. Vision parser prompt updated to request extension_sleeve + installation_date merged into cert_format JSON.

Integration Audit

  • All 13 files pass AST syntax check
  • All 14 modules import successfully in Docker
  • Spec keys match between parser output and PRODUCT_SPEC_REGISTRY (verified FND-FTR, WTR-BSMT, ENC-SYS, RTW-WALL)
  • Backward compatible: existing driving_log.json files without new fields still work
  • API rebuilt and health check passed
  • Updated entirely.unlikely.guide/status-triggers with all 6 new automations

Notes

  • Both pages verified serving 200 OK via curl
  • Zero remaining references to WeasyPrint, Stripe, Google Calendar, or Kulu in either file
  • mostly-mcp vault tools not connected this session — wrote session note directly to disk