Pipeline Board
Add to queue
Re-assessment queue 0
Event queue 0
Proactive actions pending 0
Unresolved (needs a mapping) 0
Completed 0
Borrower Heartbeat & Pre-approval Pipeline
End-to-end flow — deterministic ingestion (no LLM) → LLM judgment via claude -p skills → atomic outputs → this dashboard. Shadow mode suppresses every external side effect until cutover.
1 · Ingestionsystemd user timers · deterministic · NO LLM
Communicationspollers/comm_poller.py
FUB texts / calls / notes → queue events. Direction from FUB isIncoming metadata.
every 1 min
Emailpollers/email_poller.py
Gmail via gog CLI → queue events. Direction from the From: header.
every 1 min
Arive LOS cachepollers/arive_poller.py
Loan pipeline snapshot → data/arive_loans.json (no queue; read on demand).
every 30 min
▼atomic enqueue → queue/pending/*.json
2 · Heartbeat processingbin/process_queue.py · every 2 min · flock
Coalesce & resolvelib/heartbeat_core.py
Claim events, coalesce by fub_id, resolve borrower, assemble the communication history.
deterministic
Classify borrowerskills/classify-borrower
The judgment: stage, status, urgency. Intel (deal_summary/handling) only for NEEDED / NEW_LEAD.
claude -p skill
KG enrichlib/kg_enrich.py
Re-enrich the contact's profile_json after any new message/scrape. Fingerprint-gated.
claude -p skill
▼lib/pipeline_writer.py — single writer, fcntl + tmp + os.replace
3 · Pre-approvalon application · document-verified underwriting
Arive extractionlib/arive_extract.py
Rides Arive's own API traffic (CDP) → structured 1003, tri-merge, cash-to-close. Downloads source PDFs → data/docs/<fub_id>/arive/.
CDP capture
Assemble & gatelib/preapprove.py
Build the work file; fingerprint-gate re-assessment. Enforces: incomplete file can never be preapprovable.
deterministic
Underwriteskills/preapprove-file
Completeness check FIRST → CALCULATE qualifying income from the real PDFs (per program) → status + letter. Reads underwriting-reference.md.
claude -p skill
▼atomic write → data/preapprovals.json (keyed by fub_id)
Outputs / stores
data/heartbeat.json
Actionable deal cards only (NO_ACTION & 60-day-stale dropped).
data/preapprovals.json
Per-borrower assessment + draft letter + completeness checklist.
data/emails.db
Communication store (emails / texts / calls / KG profiles).
▼read-only
4 · Dashboarddashboard/server.py · :3000
Board / Funnel / Tasksdashboard/cos.html
Deal cards, funnel view, task list, activity — served from heartbeat.json.
Pre-approval panel/api/preapproval
Completeness banner, required-docs checklist, income calculation, draft letter.
this build
On-demand drafts/api/draft
draft-reply skill runs on demand. Sends suppressed under SHADOW_MODE.
claude -p skill
DET deterministic Python — assembles facts, no judgment LLM claude -p skill — all judgment lives in SKILL.md OUT user-facing output