The chat widget on this site is grounded in the same typed data that renders the pages. Here's how it's built, the bug that killed it for days, and what I now check before putting an LLM in front of customers.
Most handoff pain isn't missing code, it's missing reasons. Four docs, an intentional-design register, and known debt with triggers — the structure I use so the next engineer stops 'fixing' things on purpose.