What Is a Quality Gate? How ThemeSmith Catches Bugs Before Publishing
ThemeSmith runs 40+ automated quality checks on every generated website before it can go live. Here is how the quality gate works, what it catches, and why no site ships without passing.

A quality gate is a mandatory checkpoint that every generated website must pass before it can be published. If the site fails, it does not go live. There is no override button for customers, no “publish anyway” option, no way to skip the process. The gate either opens or it stays shut.
This is not a philosophy — it is an engineering decision. When AI generates a complete website, the output needs to be validated with the same rigour you would apply to any production deployment. The code looks correct to a human reviewer. The page renders in a browser. But between “renders” and “works properly for every visitor on every device,” there is a gap that only automated, systematic testing can close.
ThemeSmith runs 40+ automated quality checks on every generated website. Every site is scored 0 to 10 with letter grades from A+ through D, across seven categories: performance, accessibility, SEO, best practices, visual quality, content quality, and mobile responsiveness.
Three tiers of checks
Not all quality issues are equally serious. A missing alt tag on a decorative image is a different severity than a contact form button that cannot be clicked. ThemeSmith's quality gate organises its checks into three severity tiers, each with different consequences.
Hard blockers. Any single hard blocker failure prevents the site from being published. These checks cover issues that would make the site fundamentally broken for visitors: content integrity failures, navigation links that point to pages that do not exist, text rendered invisible against its background, code safety violations that crash interactivity, visual layer conflicts where interactive elements are buried or unreachable, and interaction testing failures where buttons or forms do not respond.
Hard blockers exist because some defects have zero tolerance. A restaurant website that shows the wrong business name, or a service business whose “Book Now” button does not respond to clicks, is worse than no website at all.
Soft blockers. Two or more soft blocker failures prevent publishing. A single soft blocker is a warning; two are a pattern. These checks cover animation integrity, form validity, layout consistency, heading hierarchy, image accessibility, responsive behaviour, contrast ratios, placeholder content detection, and performance budgets. Individually, each issue is tolerable. Collectively, they indicate a site that is not ready.
Informational checks. These never block publishing. They measure content density, readability, colour vision accessibility, dead link detection, hover state completeness, visual balance, and design consistency. The results are logged, scored, and surfaced in the site's quality dashboard, but they do not prevent a site from going live.
Cross-layer validation: the checks other builders cannot run
The most valuable checks in the quality gate are the ones that no standard website audit tool performs. ThemeSmith's QA engine cross-validates JavaScript, CSS, and HTML together as a single integrated system — not three independent files.
When an AI model generates a full website in one pass, it produces code where a JavaScript event listener might target a CSS class name that exists in the model's training data but was never actually generated in the page's markup. The HTML is valid. The CSS parses correctly. The JavaScript has no syntax errors. But the page has a button that does nothing when clicked, and no browser tool will flag it.
The quality gate catches these cross-layer failures by parsing the complete DOM, extracting every CSS rule and JavaScript selector reference, and walking the dependencies between them. A querySelector call that targets a class not present in the DOM is a contract violation. An animation-name with no matching keyframes block is a contract violation. A z-index stacking context that buries an interactive element is a contract violation. The gate finds all of them. For a deeper look at how this cross-validation works, see how Quality Shield catches bugs other builders miss.
Automated repair before human review
Finding bugs is only half the problem. Fixing them at scale — without introducing new issues — is the harder half. ThemeSmith's quality gate includes an automated repair system that operates in two modes.
Deterministic auto-fix. Six categories of common issues are repaired automatically with rule-based fixes that require no AI judgment. Missing hover states on interactive elements get standard hover transitions applied. Heading hierarchy violations (jumping from h2 to h5) are corrected to proper sequential order. Viewport meta tags are normalised. Section anchor IDs are generated for cross-page navigation. Missing image source attributes are flagged and patched. Unsafe inline DOM event bindings are converted to proper event listeners. These fixes are fast, deterministic, and safe — the same input always produces the same output.
Intelligent visual repair. Issues that require contextual judgment — a colour combination that technically passes WCAG but looks wrong against the site's design palette, or a layout that breaks at an unusual viewport width — are handled by an escalating repair system. The system starts with lightweight fixes (Tier 0: deterministic), escalates to fast AI review (Tier 1), then to more capable models for complex visual issues (Tier 2), and reserves the most powerful model for structural repairs that require understanding the full page context (Tier 3). Each tier validates its fix against the original content to ensure no text or meaning is changed in the process.
Lighthouse and beyond
The quality gate integrates Google Lighthouse for standardised performance, accessibility, SEO, and best practices scoring. But Lighthouse is one input among many, not the whole picture. Lighthouse tells you whether your images are compressed and your fonts load efficiently. It does not tell you whether your mobile menu opens when tapped, whether your testimonial carousel advances, or whether your booking form submits successfully.
ThemeSmith's quality gate checks all of these. WCAG contrast validation runs at every text-background boundary, not just the ones Lighthouse samples. Responsive breakpoint testing verifies that layouts reflow correctly at standard device widths. Content quality checks flag placeholder text, lorem ipsum remnants, and AI-generated filler phrases. Performance budget checks enforce size limits on HTML, CSS, and JavaScript payloads.
The seven scoring categories — performance, accessibility, SEO, best practices, visual quality, content quality, and mobile responsiveness — each contribute to the overall 0-to-10 score. A site can score well on Lighthouse and still fail the quality gate if its visual quality or content quality is below standard. This is by design. A fast, accessible page with placeholder content is not ready for publishing.
Why the gate is non-negotiable
Every site that ThemeSmith publishes passed the quality gate. There is no exception for rush jobs, no reduced checking for simpler sites, no “good enough” threshold that lets marginal sites through. The standard is the same whether you are generating a one-page landing site or a fifteen-page business website with a blog, booking system, and image gallery.
This decision has a cost. Sites that fail the gate take longer to deliver because they go through repair cycles. But the alternative — shipping sites with broken buttons, invisible text, or mismatched navigation — is worse. A website that looks professional but does not function correctly damages the business it represents. The quality gate exists to prevent that outcome.
For a broader view of how the quality gate fits into the full build process, see how ThemeSmith works. For details on what the quality dashboard shows site owners, including scores, issues, and fix history, explore the quality page. And for a quick definition of the quality shield concept, see the glossary.