| name | build-sites-as-specs |
| description | Architect a website-generation system that structurally cannot produce slop, by compiling a validated specification into output instead of generating HTML directly. Use when building an AI site generator, a templating/CMS pipeline, a multi-tenant site builder, or any system where a model or template produces web pages and you keep getting hallucinated facts, inconsistent structure, weak SEO/accessibility, and unmaintainable markup. Triggers include "build a website generator", "AI keeps generating slop sites", "how do I make site generation reliable", "spec-driven site building", "stop the model inventing facts on the page". |
Build Sites as Specs
Most AI site builders go straight from a prompt to HTML. That single shortcut is the source of every recurring failure: hallucinated facts, inconsistent structure, broken accessibility, weak SEO, vendor lock-in, output you can't diff or edit. The fix is to stop treating the website as the artifact. The specification is the artifact. HTML is just one compiled output of it.
Business Data → Brief → SiteSpec → Renderer → HTML
Reframed as a compiler: the Brief is source code, the SiteSpec is the intermediate representation, the design system is the standard library, the Renderer is the backend target, HTML is the compiled output. Once you see it this way, the model stops being the center of the system: it fills slots in a spec, it never writes markup, controls design, or invents facts.
The rule above all others
Do not build the AI part first. Build the grammar (the spec), the compiler (the renderer), and the validator (the policies) so well that the AI becomes the least interesting, most replaceable part of the system.
Build order, inside-out, do not skip ahead:
Specification → Validation → Rendering → Generation
Generation comes last. If a hand-authored spec can't be validated and rendered into a production-quality site offline, with zero network and zero model calls, the architecture isn't done, and adding generation on top will only multiply the cracks.