When you integrate an AI generation step into a drag-and-drop editor, you face a problem that is rarely discussed in LLM tutorials: the model's output must be structurally valid, not just semantically good. A hallucinated CSS class name is a style regression. A hallucinated prop key in an editor schema is a broken component.
This is a writeup of what I learned building WebDigitize, an AI-powered website generator and editor for Nigerian small businesses, using Puck as the editor layer.
What Puck Expects
Puck stores page state as a JSON document:
{






