After HolyStitch writes the project to disk, your AI agent works through this checklist in order. The steps are documented inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BaselAshraf81/holystitch/llms.txt
Use this file to discover all available pages before exploring further.
project-context.md inside every generated project so the agent can pick up where it left off — even in a new session.
Work through these steps in order. Each step builds on the previous. Running the build before fixing structural issues (step 1) generates misleading errors that slow you down.
Verify every component matches its source HTML
Before touching any generated file, open Multiple root elements — if a component returns two sibling elements with no wrapper, add a fragment:How to find the right source HTML: Look for the
stitch-source/ and read each screen’s HTML from top to bottom.Why: HolyStitch is a deterministic regex-based compiler. It handles the mechanical transforms correctly, but three classes of issues require human or AI judgment:Unclosed tags — the most common issue. If a <!-- ComponentName --> comment marker sat inside a nested element, the component HTML was cut mid-element, leaving unclosed tags. Every opened tag must have a matching close tag. Reconstruct missing structure by reading the source HTML directly.Style strings — style="color:red" is invalid JSX. Every style= attribute must be converted to a style object with camelCase property names:<!-- ComponentName --> comment marker in the source file. The block element immediately following that comment is the exact HTML the component should reproduce.Run the build and fix all TypeScript/JSX errors
Run the build and fix every error before proceeding to later steps.Why: TypeScript and JSX errors reveal the structural issues that step 1’s visual inspection may have missed. A clean build is the foundation everything else depends on.When an error points to a component, open the corresponding
- Next.js
- Vite
stitch-source/*.html file as ground truth. Do not guess at the correct structure — read the original HTML.Wire up navigation routing
Stitch outputs every link as Links with no matching internal route (social links, external URLs) should use their real
href="#" because it has no knowledge of multi-page routing. Replace those placeholders with real routes from the routing table in project-context.md.Why: Navigation components like TopNavBar and Footer are shared across all pages. Until their links point to real routes, the app is not navigable.- Next.js
- Vite
Replace For active-state styling, use
<a href="#"> with Next.js <Link>:usePathname() from next/navigation. Add 'use client' to any navigation component that reads the pathname:href or remain as href="#" with a // TODO comment.Normalize inline font declarations
Stitch emits font families as Tailwind arbitrary values like
font-['Inter'] or font-['JetBrains_Mono']. Replace these with the semantic aliases already defined in tailwind.config.js.Why: Arbitrary font classes bypass your Tailwind theme config and make future re-theming harder. The extracted theme already has named aliases — use them.How to do this:- Open
tailwind.config.jsand read thefontFamilykeys intheme.extend. - Search every
.tsx/.jsxfile incomponents/forfont-['...']patterns. - Replace each inline font class with the matching semantic alias:
- If multiple aliases map to the same font family, pick the alias that best describes the element’s role:
| Element | Alias to use |
|---|---|
Headings (h1–h3) | font-headline |
| Body copy | font-body |
| Labels, captions | font-label |
| Code blocks | font-mono |
- Run the build after replacing to confirm no class names were broken.
Verify each page renders correctly in a browser
Start the dev server and open each route in a browser. Compare each page visually against its source HTML rendered directly in a browser.Why: The build passing does not guarantee visual correctness. Layout, spacing, color, and content issues only surface in the browser.For each route listed in
project-context.md, check:- Layout and spacing match the source HTML
- Colors match (consult
tailwind.config.jsfor token values) - All text content is verbatim — headings, labels, copy
- Images render (or placeholder URLs are visible — addressed in step 7)
- Navigation links are wired up from step 3
stitch-source/ — not by guessing at class names.Review the Tailwind theme config
Open
tailwind.config.js and verify the extracted theme renders correctly.Why: HolyStitch extracts the Tailwind theme directly from the Stitch HTML, but multi-screen projects can produce token conflicts if different screens define the same color token with different values. These conflicts are flagged in project-context.md under Structural Warnings.If a conflict was detected, open each conflicting screen’s source HTML in stitch-source/ and decide which value is correct for the shared theme.Replace placeholder images
All
src and backgroundImage URLs pointing to lh3.googleusercontent.com are temporary Stitch preview links. They may expire or be rate-limited.Why: Stitch serves image previews from its own CDN. These URLs are not suitable for production and should be replaced with assets you control.Replace placeholder URLs with:- Images in your
/publicdirectory:src="/images/hero.png" - A CDN of your choice
- Imported local assets (Vite):
import heroImg from './assets/hero.png'
lh3.googleusercontent.com across all component files to find every occurrence:Add 'use client' where needed
Any Next.js component that uses
useState, useEffect, event handlers (onClick, onChange, etc.), or browser APIs requires 'use client' as its first line.Why: Next.js App Router components are Server Components by default. Client-only APIs are not available in Server Components and will cause a runtime error.HolyStitch automatically adds 'use client' to components where it detects event handlers during conversion. However, verify manually — the converter uses a heuristic and may miss some cases, particularly when hooks are added during post-conversion edits.Vite projects do not need
'use client'. All components in a Vite project can use hooks and event handlers freely.Add typed component props (optional polish)
All generated components have empty
interface ComponentNameProps {} definitions. Once the build passes and pages render correctly, add typed props for configurable values.Why: The converter preserves all content as static JSX. Adding props makes components reusable and documents the configurable surface area of each component.Good candidates for props, flagged as inline comments in each component file:- Heading text:
title: string - Image URLs:
imageSrc: string - Link targets:
href: string - Variant flags:
variant: 'primary' | 'secondary'