Skip to content

Repository files navigation

Verdict

AI lead qualification that won't guess.

Live demo: https://signaldesk-six-sigma.vercel.app — no signup, live pipeline, seeded fictional data, nothing is sent.

Verdict turns messy inbound leads into researched, qualified, correctly-routed CRM records for a fictional B2B software company (Northstar Ops). It automates the repeatable work — research, scoring, routing, drafting — while structurally refusing to do the things that make naive AI lead-scoring worse than no automation at all.

The failure thesis

An LLM asked to score leads scores everything 78 — confident, uncalibrated, unexplained. An LLM asked to research a company it doesn't know invents a plausible size and industry. Both write straight into the CRM, where the fabrication becomes indistinguishable from truth. The AI meant to clean your pipeline becomes the fastest way to poison your system of record.

Every design decision below exists to answer that sentence.

Four responsible outcomes

Every lead exits the pipeline as exactly one of:

Outcome When What happens
Qualified Sufficient evidence, meets the ICP Assigned, outreach drafted (approval-gated)
Insufficient evidence Too few criteria resolvable No score is emitted. The lead returns the specific questions that would unblock scoring
Disqualified Scored or classified out (vendor pitch, consumer, out of region) Reason recorded, no rep time spent
Duplicate / merge review Resolves to an existing CRM record Activity attached — never a silent duplicate, never an auto-merge on name similarity alone

The guided demo runs one engineered lead per outcome — including a prompt-injection scenario where the researched company page contains an embedded instruction demanding a fake 100/sales-ready score and a fabricated discount. It doesn't work, and the audit trail shows why.

How it refuses to guess

  • Identity resolution runs first, before any money is spent on research. Exact email/domain match is the only "confident" signal; name similarity — even a perfect score — never auto-merges.
  • Evidence-sufficiency gate: scoring is blocked unless a floor of ICP criteria (default 4 of 7) resolve with evidence. Below the floor, score is null by type — a number on thin evidence structurally cannot exist.
  • Deterministic scoring: the score is points arithmetic over rule results, computed by ordinary code. The LLM classifies and extracts; it never scores.
  • Two-layer extraction defense: research extraction is schema-constrained (there is no field an injected instruction can land in) and every extracted fact must carry a verbatim quote that (a) literally appears in the source and (b) survives an independent entailment check that also flags instruction-shaped text.
  • Draft claims are re-verified independently — the drafting call's self-report is never trusted (citations drift; we learned this on a previous project).
  • Propose-then-apply CRM writes, idempotent on submission ID: replaying a webhook returns the existing result, never a duplicate record.
  • Append-only audit trail: every stage of every run, with durations and failure states.

Architecture

Next.js 16 (App Router) · Supabase Postgres (RLS-locked, service-role only) · Claude Haiku for every model call at temperature: 0 · Postgres jobs table as the durable queue · race-safe daily spend cap (SELECT ... FOR UPDATE) · per-client rate limiting · response cache with pre-warmed demo scenarios.

Enrichment researches a seeded fictional mini-web served by the app itself (/sources/...) rather than scraping the live internet — deterministic, $0, no PII, and every citation in the demo is a real clickable URL. See /architecture on the live site for the full 11-stage flow.

Run locally

npm install
cp .env.example .env.local   # fill in Anthropic + Supabase service-role keys
npm run dev
npm run smoke-test   # runs all 4 scenarios against the real model calls, asserts outcomes
npm run warm-cache   # re-warms the demo cache (run after any fixture/rule change)

Honest status

  • The 4 guided scenarios are verified end-to-end (locally and in production); the full 60-case labeled eval suite with held-out split is planned but not yet built — claims on the site are scoped accordingly.
  • CRM writes are simulated against seeded Postgres tables; the HubSpot developer-account integration is the next major phase.
  • Turnstile ships with Cloudflare's published test keys; worst-case abuse cost is bounded by the spend cap + rate limit.

Design system is a port of the Agenio Framer template's measured tokens — see docs/DESIGN-agenio.md for the extraction notes.


Built by Ariel Magalso. Northstar Ops, Harborline Clinics, and every other company named in the demo are fictional.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages