A sales bot that dropped warm leads, fixed with failing tests first.
Demo rebuild, Oct 2026Node, Express, SQLiteClaude API60 automated tests
ProblemIn April 2026 a client's no-code DM bot (CloseBot and GoHighLevel) read "I will book next time" as Not Interested. It tagged the lead declined and stopped replying to someone who had just said they would book.
CauseThree things together: the prompt lumped deferrals into opt-out, "next time" and "maybe later" were on the hard decline list, and the decline threshold was 3 out of 10.
FixI rebuilt the same kind of bot in code and wrote the failing tests first: 8 of them failed on version one. Then the fix: deferrals off the opt-out list, threshold raised to 5, and a prompt that says putting off a booking is not an opt-out.
After the fix all 60 tests pass, and 15 of 15 live checks against Claude Sonnet 5.5 pass. A real "stop sending me these messages" still stops the bot.
My role: diagnosis, rules, tests and review. Code written with Claude Code under my direction. The business, prices and conversations in the demo are fictional; the client bot and its data stayed with the client.