outreach: follow-up radar — deterministic "needs attention" + one-click draft (v0.1.0:69)

The Outreach page now opens with a "Needs attention" list. A deterministic scan
(outreach_agent.follow_up_radar) surfaces investors per the email history: tier 0 "you
owe a reply" (their email is the most recent, unanswered, >=3d), tier 1 flagged + quiet,
tier 2 warm lead gone quiet (no contact in >=45d). Most urgent first; every reason is
verifiable from the data (no LLM in the surfacing — the deliberate fix for the trust
problem that sank objection-grounding). Excludes graveyard; needs email history. One
click sets the investor + suggested type (follow-up/nurture) and runs the existing
outreach drafter. Route GET /api/outreach/radar. Test mcp/test_outreach.py extended
(owe-reply/warm-quiet/recent/graveyard/order). Verified live in preview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Keysat
2026-06-08 21:31:52 -05:00
parent b5619d61e1
commit 787d580550
7 changed files with 181 additions and 7 deletions
+17
View File
@@ -1808,6 +1808,8 @@ class CRMHandler(BaseHTTPRequestHandler):
return self.handle_list_activity_proposals(user)
if path == '/api/outreach/investors':
return self.handle_list_outreach_investors(user)
if path == '/api/outreach/radar':
return self.handle_outreach_radar(user)
# Users
if path == '/api/users':
@@ -3920,6 +3922,21 @@ class CRMHandler(BaseHTTPRequestHandler):
finally:
conn.close()
def handle_outreach_radar(self, user):
"""Deterministic 'who needs attention' scan (reasons are checkable, not LLM guesses)."""
if _outreach_agent is None:
return self.send_error_json("Outreach agent unavailable", 503)
conn = get_db()
try:
try:
own = [r[0] for r in conn.execute("SELECT email_address FROM email_accounts")]
except Exception:
own = []
items = _outreach_agent.follow_up_radar(conn, own, now())
return self.send_json({"items": items})
finally:
conn.close()
def handle_outreach_draft(self, user, body):
"""Draft tailored LP outreach through the redaction boundary (draft-only —
a human reviews/edits/sends; guardrails #4, #6)."""