AUTOMATION — PRODUCTION —
Leadline
A speed-to-lead system that answers, qualifies, and books a new lead in seconds.
≈ 2 min read
AT A GLANCE
- STATUS
- PRODUCTION
- TIMELINE
- 2026-07 — 2026-07
- LANGUAGES
- TypeScript / SQL
- CATEGORY
- AUTOMATION
TIME TO A SPECIFIC ANSWER
OUTCOME
Live in production.
METRICS
M.01 — TIME TO A SPECIFIC ANSWER
Intake to the context-aware AI answer on the first real production lead (n=1, a single lead — stated because the sample is small). This is the product's answer time; the 0.098s receipt it replaced was a deterministic DB write, not an answer.
M.02 — COMMITS
Solo build, spec-driven, from empty repo to a passing end-to-end acceptance run.
M.03 — APPLICATION CODE
TypeScript and TSX across the app, the qualification brain, the worker, and the design system.
M.04 — UNIT TESTS
Offline tests over the make-or-break logic: the deterministic decision loop, field extraction, metrics derivations, anonymization.
CH.01
The problem
The business that answers a new lead first usually wins the job. Speed, not price or quality, decides most of them. But a growing trades company or clinic runs inbound leads at volume while its team is on the job, so calls and form fills sit for hours. By the time anyone follows up, the customer has already booked whoever picked up in the first minute. The cost is real, repeated, and worst after hours, and the generic lead tools do not bend to one business's idea of a good lead, its calendar, or its records.
CH.02
What I built
Leadline answers every lead the instant it arrives (by web form or by email) and does four things in plain view: it answers, qualifies, books, and alerts. It answers in seconds, always disclosing that it is automated. It runs a short context-aware conversation that asks only what is missing, scores the lead against the business's own rules, books qualified leads into a real calendar, and pings a real person the moment a hot lead appears. Every message, score, decision, and timestamp is written into a per-lead audit record: the trust story and the source of every number shown.
CH.03
How it works
The response path is deterministic before it is smart: intake stamps the arrival time, writes the lead and the instant receipt with no model call, and only then runs the AI. That keeps the hero response-time number honest: it can never depend on a language model. The model work runs on an always-on worker that polls a job queue, so the web tier stays fast and the conversation engine (Claude Sonnet, through a single config-switchable gateway) runs off the request path. The database is the conversation memory, which makes the worker reboot-safe with no session state to lose. An invited business teaches the system its own material through a studio (drop documents, see the gap map, test the answers, confirm), and nothing unconfirmed ever answers a real lead.
CH.04
Results
Leadline is live in production. The first real production lead got a context-aware answer in 16.98 seconds, measured from logged timestamps on a single lead. That number replaced an earlier 0.098-second figure, and the distinction is the honest one: 0.098s was the deterministic receipt the system wrote on arrival, not an answer, and it was retired as the hero metric the moment the context-aware reply became the only reply a lead sees. A full agent-run acceptance pass (a real browser driving real sign-ins and real leads end to end, then restoring the database to its exact baseline) passes, and did the job an acceptance test is for: it caught a conversion-critical defect (first-time invited sign-ups never created their account or budget) that no unit test could see, which was then fixed and re-validated on a genuine fresh sign-up. Every number on the product traces to the audit trail or is labeled external market evidence.
STACK