Case 05 / Retail sales agent · inherited codebase
Randy
A consultative sales agent for a Vietnamese electronics retailer, inherited as a teammate's hackathon build and re-architected until every SKU, every price and every PC build came from server code instead of the model.

The rule
The model writes the sentence. It never picks the SKU, the price, or the part — and it can never narrate something the server did not actually render.
Build notes
Grounded by construction
Search, comparison and PC building are server-side tools over an 11,865-SKU catalog. The reply and the product cards are rendered from one tool result, so the prose cannot contradict what is on screen.
Six adversarial rounds
Bilingual shopper agents attacked it for 400+ live turns: jailbreaks, haggling, forged history, absurd budgets. All refused. Two of four reported "criticals" turned out not to be real — findings get re-verified offline before anything is changed.
Guards on the output
Five rounds of prompt rules stopped converging, so a finding-rate analysis moved the checks onto what actually ships: owned parts cannot be re-billed, build totals are re-derived, and a comparison that never rendered cannot be described.
The catalog is the product
The full catalog ships on disk instead of paging from a Tokyo Postgres on every cold start — 20s down to ~5s, PC builds 5s down to ~470ms — with an EN↔VI vocabulary so English category words still reach a Vietnamese catalog.
More screens

