ISSUE 04

IN PROGRESSPythonClaude APIFastAPIHubSpot

CONTEXT

Pipeline source attribution at Freshpaint was a stack of ~15 brittle HubSpot workflow rules that fired on first match.They couldn't weigh signals against each other, couldn't explain themselves, and silently broke whenever a property name or enum value changed.

BUILD

A FastAPI receiver on Fly.io catches HubSpot deal-creation webhooks, builds a structured snapshot (deal, creator, owner, contacts, companies, custom objects, timeline) via parallel HubSpot reads, then hands it to Claude Opus 4.7 in a tool-use loop where `submit_classification` enforces a typed output schema.Prompt caching on the system block keeps full eval-set runs cheap.Every ops override is captured to a `corrections.jsonl` feedback file, so the system gets smarter over time, and live HubSpot taxonomy is fetched at startup so the agent stays in sync without redeploys.

RESULT

Phase 1 (offline classifier) hit 76.3% accuracy on a 139-deal seed set against an 80% gate.Three of four categories pass; the next prompt iteration deepens engagement-timeline context to close the gap.Webhook receiver and Fly.io deployment are built but gated behind the accuracy bar.

LINKS

← All projects