launchframe 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,25 +26,23 @@ Before reconnaissance, write or update:
26
26
 
27
27
  After structure and styles match the reference, apply the **SaaS idea** to hero, headings, and primary CTAs where the reference uses interchangeable marketing copy, **without** changing layout grids, spacing, or motion from extracted specs. **Brand identity** (below) must be **original** for anything you ship as the user’s product — never pass off the reference company’s trademarks or distinctive marks.
28
28
 
29
- **Precedence:** For those surfaces (hero, main headings, primary CTAs), **final ship copy comes from the SaaS idea**, not the reference — still capture reference strings in research/specs if useful for QA diffs. Everywhere else, keep **verbatim** reference text unless the user overrides.
30
-
31
29
  ---
32
30
 
33
31
  ## Scope Defaults
34
32
 
35
33
  The target page(s) are the URL(s) you parsed in Pre-Flight. Clone exactly what's visible at each URL. Unless the user specifies otherwise, use these defaults:
36
34
 
37
- - **Fidelity level:** Pixel-perfect **layout, spacing, typography scale, and motion** (durations, easings, keyframes, triggers) matched to the reference. **Colors** match where you are emulating neutral/UI chrome from the reference; where **Brand identity** applies, use the **new palette** and assets while keeping the same CSS structure (fills land on different tokens). **Animations** stay reference-faithful unless the user opts out.
35
+ - **Fidelity level:** Pixel-perfect exact match in colors, spacing, typography, animations
38
36
  - **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
39
37
  - **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
40
38
  - **Customization:** Structure and visuals — pure emulation of the reference. **Marketing copy** — apply the parsed **SaaS idea** where hero/headlines/CTAs are interchangeable (see “SaaS copy overlay” above); do not invent a different product than the user’s idea.
41
- - **Brand identity:** The reference is a **pattern** for layout, motion, and UI craft — **not** permission to ship their brand. Unless the user **explicitly** asks for a faithful copy of the reference brand (e.g. licensed work, clearly labeled internal mock, private design audit), **invent an original brand** aligned with the SaaS idea: product name, wordmark or simple logomark (SVG or styled text) sized to the same logo slot, favicon / app icon, OG imagery, and a cohesive palette. Do **not** reuse their trademarked logo paths, mascot art, or distinctive illustrative brand assets; use originals or functional UI icons instead. Hero or lifestyle images that center the reference brand should be replaced with **original** imagery or neutral compositions that keep the **same layout rhythm**. **Keep** reference-faithful neutrals where they are clearly **non-brand** UI (borders, subtle grays, default body text color roles) unless they are unmistakably part of their distinctive palette. Note in `docs/research/LAUNCHFRAME.md` which marks and assets are **original brand** versus **layout-only** extraction.
39
+ - **Brand identity:** The reference is a **pattern** for layout, motion, and UI craft — **not** permission to ship their brand. Unless the user **explicitly** asks for a faithful copy of the reference brand (e.g. licensed work, clearly labeled internal mock, private design audit), **invent an original brand** aligned with the SaaS idea: product name, wordmark or simple logomark (SVG or styled text) sized to the same logo slot, favicon / app icon, OG imagery, and a cohesive palette. Do **not** reuse their trademarked logo paths, mascot art, or distinctive illustrative brand assets; use originals or functional UI icons instead. Hero or lifestyle images that center the reference brand should be replaced with **original** imagery or neutral compositions that keep the **same layout rhythm**. Note in `docs/research/LAUNCHFRAME.md` which marks and assets are **original brand** versus **layout-only** extraction.
42
40
 
43
41
  If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
44
42
 
45
43
  ## Pre-Flight
46
44
 
47
- 1. **Browser automation is required.** Check for available browser MCP tools (Chrome MCP, Playwright MCP, Browserbase MCP, Puppeteer MCP, etc.). Use whichever is available — if multiple exist, **prefer Chrome DevTools MCP** for inspection: it maps to the same engine the user sees and preserves **computed `animation` / `transition` / scroll-driven** values accurately. If none are detected, ask the user which browser tool they have and how to connect it. This skill cannot work without browser automation. **Motion parity:** every pass (reconnaissance, per-section extract, QA) must treat **motion as first-class** — same **durations, delays, easings (`cubic-bezier` / steps), iteration counts, fill modes, directions, keyframe percentages, and scroll/view-timeline bindings** as the live site, not “similar” motion.
45
+ 1. **Browser automation is required.** Check for available browser MCP tools (Chrome MCP, Playwright MCP, Browserbase MCP, Puppeteer MCP, etc.). Use whichever is available — if multiple exist, **prefer Chrome DevTools MCP** for inspection: it maps to the same engine the user sees and preserves **computed `animation` / `transition` / scroll-driven** values accurately. If none are detected, ask the user which browser tool they have and how to connect it. This skill cannot work without browser automation. **Pixel-perfect MCP:** every extract and QA pass must follow **Browser MCP: pixel-perfect capture** (Phase 1) — locked viewports, **verbatim** `getComputedStyle` strings (including fractional `px`, `rem`, `oklch`/`rgba`), and **geometry** from `getBoundingClientRect()` where layout matters. **Motion parity:** every pass must treat **motion as first-class** — same **durations, delays, easings (`cubic-bezier` / steps), iteration counts, fill modes, directions, keyframe percentages, and scroll/view-timeline bindings** as the live site, not “similar” motion.
48
46
  2. **Parse arguments** — extract every `http://` / `https://` URL token (there may be several). **SaaS idea** = the remaining non-URL text (trim outer quotes). Normalize and validate each URL; if any are invalid, or the SaaS idea is missing, ask the user once. For each valid URL, verify it is accessible via your browser MCP tool.
49
47
  3. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to set it up first.
50
48
  4. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
@@ -80,8 +78,6 @@ Look at each section and judge its complexity. A simple banner with a heading an
80
78
 
81
79
  Extract the actual text, images, videos, and SVGs from the live site. This is a clone, not a mockup. Use `element.textContent`, download every `<img>` and `<video>`, extract inline `<svg>` elements as React components. The only time you generate content is when something is clearly server-generated and unique per session.
82
80
 
83
- **Marketing surfaces** (hero, primary headings, main CTAs) follow the **SaaS copy overlay** and **Brand identity** rules — capture reference copy for audit, but **ship** the user’s idea there.
84
-
85
81
  **Prioritize** (see §0): downloadable imagery and backgrounds first, then SVG/icon layers, then motion. If you must **fabricate** an asset, prefer screenshot-based exports or traced vectors tied to measured box sizes — avoid unrelated stock art.
86
82
 
87
83
  **Layered assets matter.** A section that looks like one image is often multiple layers — a background watercolor/gradient, a foreground UI mockup PNG, an overlay icon. Inspect each container's full DOM tree and enumerate ALL `<img>` elements and background images within it, including absolutely-positioned overlays. Missing an overlay image makes the clone look empty even if the background is correct.
@@ -155,11 +151,48 @@ Navigate to the target URL with browser MCP.
155
151
 
156
152
  Follow **§0 (Visual crawl priority)** during the entire reconnaissance pass: images and backgrounds → SVGs/icons → motion/animations — before spending time on secondary copy tweaks.
157
153
 
154
+ ### Multi-pass DOM reconnaissance (mandatory)
155
+
156
+ **A single scroll is not enough.** You must run the live page **multiple full cycles** in browser MCP — each time walking the **DOM**, the **asset graph**, and the **motion flow** — until what you write in specs is **exactly** what the reference does, not a remembered approximation.
157
+
158
+ **Minimum passes** (run **Pass 1–4 at 1440px first**; **repeat Pass 1–3 at 768px and 390px** wherever layout or node order differs; reconciliation can be width-specific):
159
+
160
+ 1. **Structure pass (DOM, top → bottom):** Traverse from **`document.body`** in **depth-first order** (or section-by-section using regions you will later name in `PAGE_TOPOLOGY.md`). For every node that affects layout or visible content, record **tag**, **selector hint** (stable `id` / first meaningful classes), **`childNodes` order** (siblings matter — flex/grid gaps and wrappers are not optional), landmarks, and **which element is the scroll container** (`overflow` / `overscroll-behavior`). Produce a **literal hierarchy** in `docs/research/DOM_SKETCH.md` (whole page or per-section files under `docs/research/`) so builders cannot silently reorder or collapse wrapper divs. **Include “invisible” structure** (spacers, gradient overlays, absolutely positioned siblings).
161
+ 2. **Asset pass (images & layered media):** **Second full traversal** focused on §0 priority 1–2: every `<img>`, `<picture>` / `srcset`, `<video>` / `poster`, computed **`background-image`** on the element **and** ancestors, CSS masks, inline SVG / sprites. Cross-check with the Network panel. Every URL must end up **downloaded to `public/`** with a documented path, or marked **blocked / generated** with a substitute and reason.
162
+ 3. **Motion & flow pass:** **Third full journey** — slow scroll **top to bottom**, then **scroll again** (different speed) to catch lazy-mounted nodes, staggered `IntersectionObserver` reveals, and scroll-snapped stops. Run **`motionAudit`** (below) **per major section root** after scrolling that section into view. **Re-do click/hover sweeps** here while sampling `getComputedStyle` so **transitions and keyframe-driven flow** match the reference’s **order and timing**, not a generic fade-in.
163
+ 4. **Reconciliation pass:** **Fourth pass** — read `DOM_SKETCH.md`, `BEHAVIORS.md`, asset inventory, and `MOTION.md` together; list **gaps** (missing wrapper, second image layer, unnamed animation, wrong child order). For every gap, return to the site and **repeat Pass 1–3** for that subtree until the spec is closed.
164
+
165
+ **Hard rule:** Every fact in a component spec must trace to **which pass** produced it. If you “kind of remember” a structure from an earlier visit, **run the page again** — do not guess.
166
+
158
167
  ### Screenshots
159
168
  - Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
160
169
  - Save to `docs/design-references/` with descriptive names
161
170
  - These are your master reference — builders will receive section-specific crops/screenshots later
162
171
 
172
+ ### Browser MCP: pixel-perfect capture
173
+
174
+ MCP-driven inspection must be **pixel-perfect**, not “close.” Apply this on **every** reconnaissance width and again in Phase 5.
175
+
176
+ - **Viewport lock:** Resize the MCP-controlled window to exact **CSS widths** used for this project: **1440**, **768**, and **390** px (height large enough to avoid accidental mobile chrome quirks). After each resize, record **`window.innerWidth`**, **`document.documentElement.clientWidth`**, and **`devicePixelRatio`** (run the snippet below). Extraction and QA **use the same widths** so diffs are valid.
177
+ - **Zoom:** Ensure **browser zoom is 100%** (not 90%/110%). Zoom breaks `px` parity and screenshots.
178
+ - **Computed styles are verbatim:** When copying from `getComputedStyle()`, paste **exact returned strings** — including **fractional** lengths (`12.8px`), **negative** values, **`oklch()`/`lch()`/`rgba()`**, `letter-spacing`, `line-height`, `border`/`outline`, and **`calc()`**/`min()` that the cascade resolves to. **Do not round** for “clean” tokens (no `~16px`; no swapping `0.875rem` for `14px` unless the computed value truly equals that).
179
+ - **Geometry:** When alignment, gutters, or sticky offsets matter, record **`getBoundingClientRect()`** (`x`, `y`, `width`, `height`) at the relevant scroll position and width — not only padding/margin strings. Fixed/sticky layers need **viewport-relative** positions.
180
+ - **Pseudos & layers:** Extract **`::before` / `::after`** (and other pseudos the reference uses) with `getComputedStyle(el, '::before')` etc.; they often hold gradients, borders, or icons that define the pixel look.
181
+ - **Anti-aliasing & text:** Prefer **real Chrome** via MCP so **font rasterization** matches; load the **same font files/weights** in Next.js as on the reference. Note `font-feature-settings` / `font-variation-settings` / `-webkit-font-smoothing` if non-default.
182
+ - **Screenshots vs. DOM:** Screenshots are for **diffing**; the **spec values** still come from **computed style + rect**, not from eyeballing pixels.
183
+
184
+ **Viewport diagnostic** (run via browser MCP after each resize):
185
+
186
+ ```javascript
187
+ JSON.stringify({
188
+ innerWidth: window.innerWidth,
189
+ clientWidth: document.documentElement.clientWidth,
190
+ clientHeight: document.documentElement.clientHeight,
191
+ devicePixelRatio: window.devicePixelRatio,
192
+ scrollY: window.scrollY
193
+ });
194
+ ```
195
+
163
196
  ### Global Extraction
164
197
  Extract these from the page before doing anything else:
165
198
 
@@ -197,8 +230,6 @@ This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose
197
230
  - Mobile: 390px
198
231
  - At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
199
232
 
200
- Re-check **all three widths** again in **Phase 5: Visual QA Diff** so tablet regressions are not skipped.
201
-
202
233
  Save all findings to `docs/research/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
203
234
 
204
235
  ### Chrome MCP: precise motion & animation extraction
@@ -207,11 +238,11 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
207
238
 
208
239
  **Rules:**
209
240
 
210
- - **No hand-waving** — if the reference uses `0.45s cubic-bezier(0.4, 0, 0.2, 1)`, the spec and implementation use that exact string (or Tailwind utilities **only** when the **resolved computed** animation/transition longhands match — class names alone are not proof).
241
+ - **No hand-waving** — if the reference uses `0.45s cubic-bezier(0.4, 0, 0.2, 1)`, the spec and implementation use that exact string (or equivalent in Tailwind only when it truly matches).
211
242
  - **`@keyframes` source of truth** — for each animated element, record `getComputedStyle(el).animationName` and resolve the **full `@keyframes` rule** from stylesheets when allowed. Many sites inline CSS or use same-origin sheets: iterate `document.styleSheets` / `cssRules` inside `try/catch`; for **cross-origin** sheets that throw on `cssRules`, copy the rule from the **Network** response or **Sources** panel in Chrome and paste into `docs/research/MOTION.md` / the component spec. Never substitute a different easing or keyframe shape “because it looks close.”
212
- - **Scroll-driven animations** — for `animation-timeline: view()` / named timelines, capture **`view-timeline` / `scroll-timeline` on ancestors**, `animation-range`, `scroll-padding` / snap containers, and **which scroll container** is the timeline root (often `html`, sometimes a nested `overflow-y: auto` div). **`getComputedStyle` support varies** for scroll-animation longhands; also read **`cs.getPropertyValue('view-timeline-name')`**, **`scroll-timeline-name`**, **`animation-timeline`**, etc., when camelCase mirrors are missing in the engine you’re using.
243
+ - **Scroll-driven animations** — for `animation-timeline: view()` / named timelines, capture **`view-timeline` / `scroll-timeline` on ancestors**, `animation-range`, `scroll-padding` / snap containers, and **which scroll container** is the timeline root (often `html`, sometimes a nested `overflow-y: auto` div).
213
244
  - **Before/after pairs** — for scroll- or hover-driven motion, capture computed `transform`, `opacity`, and longhand `animation-*` / `transition-*` **in both states** (see §7) and the **exact trigger** (px, ratio, or event).
214
- - **Libraries** — if Lenis/GSAP/Framer is present, document **version/hooks** from **script `src` URLs** (path often includes version), `//# sourceMappingURL` / comment banners in the bundle if visible, global identifiers on `window` when safe to read, **npm lockfile** only if this repo vendors that script, and **class/DOM hooks** (e.g. `.lenis`). Sample **computed style** at rest vs. mid-animation after interactions.
245
+ - **Libraries** — if Lenis/GSAP/Framer is present, document **version/hooks** from `package` on the page or script URLs, class hooks (e.g. `.lenis`), and any **inline style** the library sets at rest vs. mid-animation (sample via computed style after the interaction).
215
246
  - **Deliverable** — maintain `docs/research/MOTION.md`: page-level keyframes inventory, global scroll/smooth-scroll setup, and per-section pointers into component specs. Large pages may scope the audit script to a **section root selector** to avoid noise.
216
247
 
217
248
  **Motion audit script** (run via Chrome MCP; optional `rootSelector` limits to a subtree):
@@ -245,8 +276,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
245
276
  }
246
277
 
247
278
  const animated = [];
248
- // Include `root` — querySelectorAll('*') misses animations on the section container itself
249
- const scope = [root, ...root.querySelectorAll('*')];
279
+ const scope = root.querySelectorAll('*');
250
280
  for (const el of scope) {
251
281
  const cs = getComputedStyle(el);
252
282
  const animName = cs.animationName;
@@ -258,7 +288,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
258
288
  const hasTrans =
259
289
  cs.transitionProperty &&
260
290
  cs.transitionProperty !== 'none' &&
261
- transDurs.some((d) => d !== '0s' && d !== '0ms');
291
+ transDurs.some((d) => d !== '0s');
262
292
  if (!hasAnim && !hasTrans) continue;
263
293
 
264
294
  animated.push({
@@ -286,9 +316,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
286
316
  opacity: cs.opacity,
287
317
  willChange: cs.willChange,
288
318
  viewTimelineName: cs.viewTimelineName,
289
- scrollTimelineName: cs.scrollTimelineName,
290
- viewTimelineNameRaw: cs.getPropertyValue('view-timeline-name'),
291
- scrollTimelineNameRaw: cs.getPropertyValue('scroll-timeline-name')
319
+ scrollTimelineName: cs.scrollTimelineName
292
320
  });
293
321
  }
294
322
 
@@ -375,7 +403,7 @@ For each section, use browser MCP to extract everything:
375
403
 
376
404
  1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to `docs/design-references/`.
377
405
 
378
- 2. **Extract CSS** for every element in the section. Use the extraction script below — don't hand-measure individual properties. Run it **once per spec scope**: usually the **section wrapper** selector (one subtree). For very large sections, run again on **inner selectors** (e.g. each card type) — the `depth` / `children.slice(0, 20)` limits are **deliberately capped** for MCP payload size; raise them or narrow `SELECTOR` when the spec is incomplete.
406
+ 2. **Extract CSS** for every element in the section. Use the extraction script below — don't hand-measure individual properties. Run it once per component container and capture the full output:
379
407
 
380
408
  ```javascript
381
409
  // Per-component extraction — run via browser MCP
@@ -402,7 +430,6 @@ For each section, use browser MCP to extract everything:
402
430
  function extractStyles(element) {
403
431
  const cs = getComputedStyle(element);
404
432
  const styles = {};
405
- // Heuristic filter — for layout-audits, re-add any dropped `auto` / `normal` / transparent values the spec calls out as significant
406
433
  props.forEach(p => { const v = cs[p]; if (v && v !== 'none' && v !== 'normal' && v !== 'auto' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') styles[p] = v; });
407
434
  return styles;
408
435
  }
@@ -566,17 +593,16 @@ After all sections are built and merged, wire everything together in `src/app/pa
566
593
 
567
594
  After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
568
595
 
569
- 1. Open the original site and your clone side-by-side (or take screenshots at the same viewport widths)
596
+ 1. **Pixel-perfect comparison setup:** Match **Browser MCP: pixel-perfect capture** — same **CSS widths** (**1440**, **768**, **390**), **100% zoom**, and record `innerWidth`/`clientWidth`/`devicePixelRatio` on both reference and clone. Then open original and clone side-by-side or take paired screenshots at those widths.
570
597
  2. Compare section by section, top to bottom, at desktop (1440px)
571
- 3. Compare again at tablet (768px) same widths as **Responsive sweep**
572
- 4. Compare again at mobile (390px)
573
- 5. For each discrepancy found:
598
+ 3. Compare at tablet (768px) and again at mobile (390px)
599
+ 4. For each discrepancy found:
574
600
  - Check the component spec file — was the value extracted correctly?
575
601
  - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
576
602
  - If the spec was right but the builder got it wrong: fix the component to match the spec
577
- 6. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
578
- 7. **Motion QA (Chrome MCP again if needed):** For every animated or transitioned element, re-run `getComputedStyle` on the reference vs. the clone at the **same scroll position / interaction state** and compare **`animation-*`, `transition-*`, `transform`, `opacity`** longhands — **resolved** durations/easings must match where the cascade specifies them (Tailwind classes are fine when they compile to the same longhands; verify in **Computed**, not by class name alone). Re-record any `@keyframes` the reference still exposes so the clone can be patched until timings align.
579
- 8. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
603
+ 5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
604
+ 6. **Motion QA (Chrome MCP again if needed):** For every animated or transitioned element, re-run `getComputedStyle` on the reference vs. the clone at the **same scroll position / interaction state** and compare **`animation-*`, `transition-*`, `transform`, `opacity`** longhands — durations and easings must match character-for-character where the cascade specifies them. Re-record any `@keyframes` the reference still exposes so the clone can be patched until timings align.
605
+ 7. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
580
606
 
581
607
  Only after this visual + motion QA pass is the clone complete.
582
608
 
@@ -584,16 +610,18 @@ Only after this visual + motion QA pass is the clone complete.
584
610
 
585
611
  Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
586
612
 
613
+ - [ ] **Multi-pass DOM reconnaissance:** structure (`DOM_SKETCH.md`) + asset sweep + motion/flow sweeps + reconciliation; repeated at **768 / 390** when layout or DOM order differs from 1440
587
614
  - [ ] Spec file written to `docs/research/components/<name>.spec.md` with ALL sections filled
588
- - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
615
+ - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated — **verbatim**, including fractional px and color functions
616
+ - [ ] **MCP pixel-perfect pass:** viewports **1440 / 768 / 390**, **100% zoom**, viewport diagnostic recorded; **`getBoundingClientRect()`** and **`::before`/`::after`** captured where they affect layout or visuals
589
617
  - [ ] Interaction model is identified and documented (static / click / scroll / time)
590
618
  - [ ] For stateful components: every state's content and styles are captured
591
619
  - [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
592
620
  - [ ] For hover states: before/after values and transition timing are recorded
593
621
  - [ ] Motion: relevant `@keyframes` captured (or cross-origin gap documented with manual paste), `docs/research/MOTION.md` updated, component specs include **exact** `animation*` / `transition*` / timeline fields from Chrome MCP
594
622
  - [ ] All images in the section are identified (including overlays and layered compositions)
595
- - [ ] Responsive behavior is documented for desktop, tablet, and mobile (1440 / 768 / 390)
596
- - [ ] Text: **verbatim** from the reference **except** hero, main headings, and primary CTAs — those match the **SaaS idea** (reference copy still captured for audit if useful)
623
+ - [ ] Responsive behavior is documented for **1440 / 768 / 390**
624
+ - [ ] Text content is verbatim from the site, not paraphrased
597
625
  - [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
598
626
 
599
627
  ## What NOT to Do
@@ -610,6 +638,8 @@ These are lessons from previous failed clones — each one cost hours of rework:
610
638
  - **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
611
639
  - **Don't give a builder agent too much scope.** If you're writing a builder prompt and it's getting long because the section is complex, that's a signal to break it into smaller tasks.
612
640
  - **Don't bundle unrelated sections into one agent.** A CTA section and a footer are different components with different designs — don't hand them both to one agent and hope for the best.
641
+ - **Don't round or “clean up” extracted values** for Tailwind guesses: `12.8px` stays `12.8px` in the spec unless the clone uses an exactly equivalent value.
642
+ - **Don't mix zoom levels or viewport widths** between reference extraction and QA — you will false-fail or false-pass pixel diffs.
613
643
  - **Don't skip responsive extraction.** If you only inspect at desktop width, the clone will break at tablet and mobile. Test at 1440, 768, and 390 during extraction.
614
644
  - **Don't forget smooth scroll libraries.** Check for Lenis (`.lenis` class), Locomotive Scroll, or similar. Default browser scrolling feels noticeably different and the user will spot it immediately.
615
645
  - **Don't dispatch builders without a spec file.** The spec file forces exhaustive extraction and creates an auditable artifact. Skipping it means the builder gets whatever you can fit in a prompt from memory.
@@ -617,6 +647,7 @@ These are lessons from previous failed clones — each one cost hours of rework:
617
647
  ## Completion
618
648
 
619
649
  When done, report:
650
+ - Multi-pass reconnaissance status (`docs/research/DOM_SKETCH.md` present; passes at **1440 / 768 / 390** as needed)
620
651
  - Total sections built
621
652
  - Total components created
622
653
  - Total spec files written (should match components)
@@ -26,25 +26,23 @@ Before reconnaissance, write or update:
26
26
 
27
27
  After structure and styles match the reference, apply the **SaaS idea** to hero, headings, and primary CTAs where the reference uses interchangeable marketing copy, **without** changing layout grids, spacing, or motion from extracted specs. **Brand identity** (below) must be **original** for anything you ship as the user’s product — never pass off the reference company’s trademarks or distinctive marks.
28
28
 
29
- **Precedence:** For those surfaces (hero, main headings, primary CTAs), **final ship copy comes from the SaaS idea**, not the reference — still capture reference strings in research/specs if useful for QA diffs. Everywhere else, keep **verbatim** reference text unless the user overrides.
30
-
31
29
  ---
32
30
 
33
31
  ## Scope Defaults
34
32
 
35
33
  The target page(s) are the URL(s) you parsed in Pre-Flight. Clone exactly what's visible at each URL. Unless the user specifies otherwise, use these defaults:
36
34
 
37
- - **Fidelity level:** Pixel-perfect **layout, spacing, typography scale, and motion** (durations, easings, keyframes, triggers) matched to the reference. **Colors** match where you are emulating neutral/UI chrome from the reference; where **Brand identity** applies, use the **new palette** and assets while keeping the same CSS structure (fills land on different tokens). **Animations** stay reference-faithful unless the user opts out.
35
+ - **Fidelity level:** Pixel-perfect exact match in colors, spacing, typography, animations
38
36
  - **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
39
37
  - **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
40
38
  - **Customization:** Structure and visuals — pure emulation of the reference. **Marketing copy** — apply the parsed **SaaS idea** where hero/headlines/CTAs are interchangeable (see “SaaS copy overlay” above); do not invent a different product than the user’s idea.
41
- - **Brand identity:** The reference is a **pattern** for layout, motion, and UI craft — **not** permission to ship their brand. Unless the user **explicitly** asks for a faithful copy of the reference brand (e.g. licensed work, clearly labeled internal mock, private design audit), **invent an original brand** aligned with the SaaS idea: product name, wordmark or simple logomark (SVG or styled text) sized to the same logo slot, favicon / app icon, OG imagery, and a cohesive palette. Do **not** reuse their trademarked logo paths, mascot art, or distinctive illustrative brand assets; use originals or functional UI icons instead. Hero or lifestyle images that center the reference brand should be replaced with **original** imagery or neutral compositions that keep the **same layout rhythm**. **Keep** reference-faithful neutrals where they are clearly **non-brand** UI (borders, subtle grays, default body text color roles) unless they are unmistakably part of their distinctive palette. Note in `docs/research/LAUNCHFRAME.md` which marks and assets are **original brand** versus **layout-only** extraction.
39
+ - **Brand identity:** The reference is a **pattern** for layout, motion, and UI craft — **not** permission to ship their brand. Unless the user **explicitly** asks for a faithful copy of the reference brand (e.g. licensed work, clearly labeled internal mock, private design audit), **invent an original brand** aligned with the SaaS idea: product name, wordmark or simple logomark (SVG or styled text) sized to the same logo slot, favicon / app icon, OG imagery, and a cohesive palette. Do **not** reuse their trademarked logo paths, mascot art, or distinctive illustrative brand assets; use originals or functional UI icons instead. Hero or lifestyle images that center the reference brand should be replaced with **original** imagery or neutral compositions that keep the **same layout rhythm**. Note in `docs/research/LAUNCHFRAME.md` which marks and assets are **original brand** versus **layout-only** extraction.
42
40
 
43
41
  If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
44
42
 
45
43
  ## Pre-Flight
46
44
 
47
- 1. **Browser automation is required.** Check for available browser MCP tools (Chrome MCP, Playwright MCP, Browserbase MCP, Puppeteer MCP, etc.). Use whichever is available — if multiple exist, **prefer Chrome DevTools MCP** for inspection: it maps to the same engine the user sees and preserves **computed `animation` / `transition` / scroll-driven** values accurately. If none are detected, ask the user which browser tool they have and how to connect it. This skill cannot work without browser automation. **Motion parity:** every pass (reconnaissance, per-section extract, QA) must treat **motion as first-class** — same **durations, delays, easings (`cubic-bezier` / steps), iteration counts, fill modes, directions, keyframe percentages, and scroll/view-timeline bindings** as the live site, not “similar” motion.
45
+ 1. **Browser automation is required.** Check for available browser MCP tools (Chrome MCP, Playwright MCP, Browserbase MCP, Puppeteer MCP, etc.). Use whichever is available — if multiple exist, **prefer Chrome DevTools MCP** for inspection: it maps to the same engine the user sees and preserves **computed `animation` / `transition` / scroll-driven** values accurately. If none are detected, ask the user which browser tool they have and how to connect it. This skill cannot work without browser automation. **Pixel-perfect MCP:** every extract and QA pass must follow **Browser MCP: pixel-perfect capture** (Phase 1) — locked viewports, **verbatim** `getComputedStyle` strings (including fractional `px`, `rem`, `oklch`/`rgba`), and **geometry** from `getBoundingClientRect()` where layout matters. **Motion parity:** every pass must treat **motion as first-class** — same **durations, delays, easings (`cubic-bezier` / steps), iteration counts, fill modes, directions, keyframe percentages, and scroll/view-timeline bindings** as the live site, not “similar” motion.
48
46
  2. **Parse arguments** — extract every `http://` / `https://` URL token (there may be several). **SaaS idea** = the remaining non-URL text (trim outer quotes). Normalize and validate each URL; if any are invalid, or the SaaS idea is missing, ask the user once. For each valid URL, verify it is accessible via your browser MCP tool.
49
47
  3. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to set it up first.
50
48
  4. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
@@ -80,8 +78,6 @@ Look at each section and judge its complexity. A simple banner with a heading an
80
78
 
81
79
  Extract the actual text, images, videos, and SVGs from the live site. This is a clone, not a mockup. Use `element.textContent`, download every `<img>` and `<video>`, extract inline `<svg>` elements as React components. The only time you generate content is when something is clearly server-generated and unique per session.
82
80
 
83
- **Marketing surfaces** (hero, primary headings, main CTAs) follow the **SaaS copy overlay** and **Brand identity** rules — capture reference copy for audit, but **ship** the user’s idea there.
84
-
85
81
  **Prioritize** (see §0): downloadable imagery and backgrounds first, then SVG/icon layers, then motion. If you must **fabricate** an asset, prefer screenshot-based exports or traced vectors tied to measured box sizes — avoid unrelated stock art.
86
82
 
87
83
  **Layered assets matter.** A section that looks like one image is often multiple layers — a background watercolor/gradient, a foreground UI mockup PNG, an overlay icon. Inspect each container's full DOM tree and enumerate ALL `<img>` elements and background images within it, including absolutely-positioned overlays. Missing an overlay image makes the clone look empty even if the background is correct.
@@ -155,11 +151,48 @@ Navigate to the target URL with browser MCP.
155
151
 
156
152
  Follow **§0 (Visual crawl priority)** during the entire reconnaissance pass: images and backgrounds → SVGs/icons → motion/animations — before spending time on secondary copy tweaks.
157
153
 
154
+ ### Multi-pass DOM reconnaissance (mandatory)
155
+
156
+ **A single scroll is not enough.** You must run the live page **multiple full cycles** in browser MCP — each time walking the **DOM**, the **asset graph**, and the **motion flow** — until what you write in specs is **exactly** what the reference does, not a remembered approximation.
157
+
158
+ **Minimum passes** (run **Pass 1–4 at 1440px first**; **repeat Pass 1–3 at 768px and 390px** wherever layout or node order differs; reconciliation can be width-specific):
159
+
160
+ 1. **Structure pass (DOM, top → bottom):** Traverse from **`document.body`** in **depth-first order** (or section-by-section using regions you will later name in `PAGE_TOPOLOGY.md`). For every node that affects layout or visible content, record **tag**, **selector hint** (stable `id` / first meaningful classes), **`childNodes` order** (siblings matter — flex/grid gaps and wrappers are not optional), landmarks, and **which element is the scroll container** (`overflow` / `overscroll-behavior`). Produce a **literal hierarchy** in `docs/research/DOM_SKETCH.md` (whole page or per-section files under `docs/research/`) so builders cannot silently reorder or collapse wrapper divs. **Include “invisible” structure** (spacers, gradient overlays, absolutely positioned siblings).
161
+ 2. **Asset pass (images & layered media):** **Second full traversal** focused on §0 priority 1–2: every `<img>`, `<picture>` / `srcset`, `<video>` / `poster`, computed **`background-image`** on the element **and** ancestors, CSS masks, inline SVG / sprites. Cross-check with the Network panel. Every URL must end up **downloaded to `public/`** with a documented path, or marked **blocked / generated** with a substitute and reason.
162
+ 3. **Motion & flow pass:** **Third full journey** — slow scroll **top to bottom**, then **scroll again** (different speed) to catch lazy-mounted nodes, staggered `IntersectionObserver` reveals, and scroll-snapped stops. Run **`motionAudit`** (below) **per major section root** after scrolling that section into view. **Re-do click/hover sweeps** here while sampling `getComputedStyle` so **transitions and keyframe-driven flow** match the reference’s **order and timing**, not a generic fade-in.
163
+ 4. **Reconciliation pass:** **Fourth pass** — read `DOM_SKETCH.md`, `BEHAVIORS.md`, asset inventory, and `MOTION.md` together; list **gaps** (missing wrapper, second image layer, unnamed animation, wrong child order). For every gap, return to the site and **repeat Pass 1–3** for that subtree until the spec is closed.
164
+
165
+ **Hard rule:** Every fact in a component spec must trace to **which pass** produced it. If you “kind of remember” a structure from an earlier visit, **run the page again** — do not guess.
166
+
158
167
  ### Screenshots
159
168
  - Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
160
169
  - Save to `docs/design-references/` with descriptive names
161
170
  - These are your master reference — builders will receive section-specific crops/screenshots later
162
171
 
172
+ ### Browser MCP: pixel-perfect capture
173
+
174
+ MCP-driven inspection must be **pixel-perfect**, not “close.” Apply this on **every** reconnaissance width and again in Phase 5.
175
+
176
+ - **Viewport lock:** Resize the MCP-controlled window to exact **CSS widths** used for this project: **1440**, **768**, and **390** px (height large enough to avoid accidental mobile chrome quirks). After each resize, record **`window.innerWidth`**, **`document.documentElement.clientWidth`**, and **`devicePixelRatio`** (run the snippet below). Extraction and QA **use the same widths** so diffs are valid.
177
+ - **Zoom:** Ensure **browser zoom is 100%** (not 90%/110%). Zoom breaks `px` parity and screenshots.
178
+ - **Computed styles are verbatim:** When copying from `getComputedStyle()`, paste **exact returned strings** — including **fractional** lengths (`12.8px`), **negative** values, **`oklch()`/`lch()`/`rgba()`**, `letter-spacing`, `line-height`, `border`/`outline`, and **`calc()`**/`min()` that the cascade resolves to. **Do not round** for “clean” tokens (no `~16px`; no swapping `0.875rem` for `14px` unless the computed value truly equals that).
179
+ - **Geometry:** When alignment, gutters, or sticky offsets matter, record **`getBoundingClientRect()`** (`x`, `y`, `width`, `height`) at the relevant scroll position and width — not only padding/margin strings. Fixed/sticky layers need **viewport-relative** positions.
180
+ - **Pseudos & layers:** Extract **`::before` / `::after`** (and other pseudos the reference uses) with `getComputedStyle(el, '::before')` etc.; they often hold gradients, borders, or icons that define the pixel look.
181
+ - **Anti-aliasing & text:** Prefer **real Chrome** via MCP so **font rasterization** matches; load the **same font files/weights** in Next.js as on the reference. Note `font-feature-settings` / `font-variation-settings` / `-webkit-font-smoothing` if non-default.
182
+ - **Screenshots vs. DOM:** Screenshots are for **diffing**; the **spec values** still come from **computed style + rect**, not from eyeballing pixels.
183
+
184
+ **Viewport diagnostic** (run via browser MCP after each resize):
185
+
186
+ ```javascript
187
+ JSON.stringify({
188
+ innerWidth: window.innerWidth,
189
+ clientWidth: document.documentElement.clientWidth,
190
+ clientHeight: document.documentElement.clientHeight,
191
+ devicePixelRatio: window.devicePixelRatio,
192
+ scrollY: window.scrollY
193
+ });
194
+ ```
195
+
163
196
  ### Global Extraction
164
197
  Extract these from the page before doing anything else:
165
198
 
@@ -197,8 +230,6 @@ This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose
197
230
  - Mobile: 390px
198
231
  - At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
199
232
 
200
- Re-check **all three widths** again in **Phase 5: Visual QA Diff** so tablet regressions are not skipped.
201
-
202
233
  Save all findings to `docs/research/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
203
234
 
204
235
  ### Chrome MCP: precise motion & animation extraction
@@ -207,11 +238,11 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
207
238
 
208
239
  **Rules:**
209
240
 
210
- - **No hand-waving** — if the reference uses `0.45s cubic-bezier(0.4, 0, 0.2, 1)`, the spec and implementation use that exact string (or Tailwind utilities **only** when the **resolved computed** animation/transition longhands match — class names alone are not proof).
241
+ - **No hand-waving** — if the reference uses `0.45s cubic-bezier(0.4, 0, 0.2, 1)`, the spec and implementation use that exact string (or equivalent in Tailwind only when it truly matches).
211
242
  - **`@keyframes` source of truth** — for each animated element, record `getComputedStyle(el).animationName` and resolve the **full `@keyframes` rule** from stylesheets when allowed. Many sites inline CSS or use same-origin sheets: iterate `document.styleSheets` / `cssRules` inside `try/catch`; for **cross-origin** sheets that throw on `cssRules`, copy the rule from the **Network** response or **Sources** panel in Chrome and paste into `docs/research/MOTION.md` / the component spec. Never substitute a different easing or keyframe shape “because it looks close.”
212
- - **Scroll-driven animations** — for `animation-timeline: view()` / named timelines, capture **`view-timeline` / `scroll-timeline` on ancestors**, `animation-range`, `scroll-padding` / snap containers, and **which scroll container** is the timeline root (often `html`, sometimes a nested `overflow-y: auto` div). **`getComputedStyle` support varies** for scroll-animation longhands; also read **`cs.getPropertyValue('view-timeline-name')`**, **`scroll-timeline-name`**, **`animation-timeline`**, etc., when camelCase mirrors are missing in the engine you’re using.
243
+ - **Scroll-driven animations** — for `animation-timeline: view()` / named timelines, capture **`view-timeline` / `scroll-timeline` on ancestors**, `animation-range`, `scroll-padding` / snap containers, and **which scroll container** is the timeline root (often `html`, sometimes a nested `overflow-y: auto` div).
213
244
  - **Before/after pairs** — for scroll- or hover-driven motion, capture computed `transform`, `opacity`, and longhand `animation-*` / `transition-*` **in both states** (see §7) and the **exact trigger** (px, ratio, or event).
214
- - **Libraries** — if Lenis/GSAP/Framer is present, document **version/hooks** from **script `src` URLs** (path often includes version), `//# sourceMappingURL` / comment banners in the bundle if visible, global identifiers on `window` when safe to read, **npm lockfile** only if this repo vendors that script, and **class/DOM hooks** (e.g. `.lenis`). Sample **computed style** at rest vs. mid-animation after interactions.
245
+ - **Libraries** — if Lenis/GSAP/Framer is present, document **version/hooks** from `package` on the page or script URLs, class hooks (e.g. `.lenis`), and any **inline style** the library sets at rest vs. mid-animation (sample via computed style after the interaction).
215
246
  - **Deliverable** — maintain `docs/research/MOTION.md`: page-level keyframes inventory, global scroll/smooth-scroll setup, and per-section pointers into component specs. Large pages may scope the audit script to a **section root selector** to avoid noise.
216
247
 
217
248
  **Motion audit script** (run via Chrome MCP; optional `rootSelector` limits to a subtree):
@@ -245,8 +276,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
245
276
  }
246
277
 
247
278
  const animated = [];
248
- // Include `root` — querySelectorAll('*') misses animations on the section container itself
249
- const scope = [root, ...root.querySelectorAll('*')];
279
+ const scope = root.querySelectorAll('*');
250
280
  for (const el of scope) {
251
281
  const cs = getComputedStyle(el);
252
282
  const animName = cs.animationName;
@@ -258,7 +288,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
258
288
  const hasTrans =
259
289
  cs.transitionProperty &&
260
290
  cs.transitionProperty !== 'none' &&
261
- transDurs.some((d) => d !== '0s' && d !== '0ms');
291
+ transDurs.some((d) => d !== '0s');
262
292
  if (!hasAnim && !hasTrans) continue;
263
293
 
264
294
  animated.push({
@@ -286,9 +316,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
286
316
  opacity: cs.opacity,
287
317
  willChange: cs.willChange,
288
318
  viewTimelineName: cs.viewTimelineName,
289
- scrollTimelineName: cs.scrollTimelineName,
290
- viewTimelineNameRaw: cs.getPropertyValue('view-timeline-name'),
291
- scrollTimelineNameRaw: cs.getPropertyValue('scroll-timeline-name')
319
+ scrollTimelineName: cs.scrollTimelineName
292
320
  });
293
321
  }
294
322
 
@@ -375,7 +403,7 @@ For each section, use browser MCP to extract everything:
375
403
 
376
404
  1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to `docs/design-references/`.
377
405
 
378
- 2. **Extract CSS** for every element in the section. Use the extraction script below — don't hand-measure individual properties. Run it **once per spec scope**: usually the **section wrapper** selector (one subtree). For very large sections, run again on **inner selectors** (e.g. each card type) — the `depth` / `children.slice(0, 20)` limits are **deliberately capped** for MCP payload size; raise them or narrow `SELECTOR` when the spec is incomplete.
406
+ 2. **Extract CSS** for every element in the section. Use the extraction script below — don't hand-measure individual properties. Run it once per component container and capture the full output:
379
407
 
380
408
  ```javascript
381
409
  // Per-component extraction — run via browser MCP
@@ -402,7 +430,6 @@ For each section, use browser MCP to extract everything:
402
430
  function extractStyles(element) {
403
431
  const cs = getComputedStyle(element);
404
432
  const styles = {};
405
- // Heuristic filter — for layout-audits, re-add any dropped `auto` / `normal` / transparent values the spec calls out as significant
406
433
  props.forEach(p => { const v = cs[p]; if (v && v !== 'none' && v !== 'normal' && v !== 'auto' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') styles[p] = v; });
407
434
  return styles;
408
435
  }
@@ -566,17 +593,16 @@ After all sections are built and merged, wire everything together in `src/app/pa
566
593
 
567
594
  After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
568
595
 
569
- 1. Open the original site and your clone side-by-side (or take screenshots at the same viewport widths)
596
+ 1. **Pixel-perfect comparison setup:** Match **Browser MCP: pixel-perfect capture** — same **CSS widths** (**1440**, **768**, **390**), **100% zoom**, and record `innerWidth`/`clientWidth`/`devicePixelRatio` on both reference and clone. Then open original and clone side-by-side or take paired screenshots at those widths.
570
597
  2. Compare section by section, top to bottom, at desktop (1440px)
571
- 3. Compare again at tablet (768px) same widths as **Responsive sweep**
572
- 4. Compare again at mobile (390px)
573
- 5. For each discrepancy found:
598
+ 3. Compare at tablet (768px) and again at mobile (390px)
599
+ 4. For each discrepancy found:
574
600
  - Check the component spec file — was the value extracted correctly?
575
601
  - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
576
602
  - If the spec was right but the builder got it wrong: fix the component to match the spec
577
- 6. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
578
- 7. **Motion QA (Chrome MCP again if needed):** For every animated or transitioned element, re-run `getComputedStyle` on the reference vs. the clone at the **same scroll position / interaction state** and compare **`animation-*`, `transition-*`, `transform`, `opacity`** longhands — **resolved** durations/easings must match where the cascade specifies them (Tailwind classes are fine when they compile to the same longhands; verify in **Computed**, not by class name alone). Re-record any `@keyframes` the reference still exposes so the clone can be patched until timings align.
579
- 8. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
603
+ 5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
604
+ 6. **Motion QA (Chrome MCP again if needed):** For every animated or transitioned element, re-run `getComputedStyle` on the reference vs. the clone at the **same scroll position / interaction state** and compare **`animation-*`, `transition-*`, `transform`, `opacity`** longhands — durations and easings must match character-for-character where the cascade specifies them. Re-record any `@keyframes` the reference still exposes so the clone can be patched until timings align.
605
+ 7. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
580
606
 
581
607
  Only after this visual + motion QA pass is the clone complete.
582
608
 
@@ -584,16 +610,18 @@ Only after this visual + motion QA pass is the clone complete.
584
610
 
585
611
  Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
586
612
 
613
+ - [ ] **Multi-pass DOM reconnaissance:** structure (`DOM_SKETCH.md`) + asset sweep + motion/flow sweeps + reconciliation; repeated at **768 / 390** when layout or DOM order differs from 1440
587
614
  - [ ] Spec file written to `docs/research/components/<name>.spec.md` with ALL sections filled
588
- - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
615
+ - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated — **verbatim**, including fractional px and color functions
616
+ - [ ] **MCP pixel-perfect pass:** viewports **1440 / 768 / 390**, **100% zoom**, viewport diagnostic recorded; **`getBoundingClientRect()`** and **`::before`/`::after`** captured where they affect layout or visuals
589
617
  - [ ] Interaction model is identified and documented (static / click / scroll / time)
590
618
  - [ ] For stateful components: every state's content and styles are captured
591
619
  - [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
592
620
  - [ ] For hover states: before/after values and transition timing are recorded
593
621
  - [ ] Motion: relevant `@keyframes` captured (or cross-origin gap documented with manual paste), `docs/research/MOTION.md` updated, component specs include **exact** `animation*` / `transition*` / timeline fields from Chrome MCP
594
622
  - [ ] All images in the section are identified (including overlays and layered compositions)
595
- - [ ] Responsive behavior is documented for desktop, tablet, and mobile (1440 / 768 / 390)
596
- - [ ] Text: **verbatim** from the reference **except** hero, main headings, and primary CTAs — those match the **SaaS idea** (reference copy still captured for audit if useful)
623
+ - [ ] Responsive behavior is documented for **1440 / 768 / 390**
624
+ - [ ] Text content is verbatim from the site, not paraphrased
597
625
  - [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
598
626
 
599
627
  ## What NOT to Do
@@ -610,6 +638,8 @@ These are lessons from previous failed clones — each one cost hours of rework:
610
638
  - **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
611
639
  - **Don't give a builder agent too much scope.** If you're writing a builder prompt and it's getting long because the section is complex, that's a signal to break it into smaller tasks.
612
640
  - **Don't bundle unrelated sections into one agent.** A CTA section and a footer are different components with different designs — don't hand them both to one agent and hope for the best.
641
+ - **Don't round or “clean up” extracted values** for Tailwind guesses: `12.8px` stays `12.8px` in the spec unless the clone uses an exactly equivalent value.
642
+ - **Don't mix zoom levels or viewport widths** between reference extraction and QA — you will false-fail or false-pass pixel diffs.
613
643
  - **Don't skip responsive extraction.** If you only inspect at desktop width, the clone will break at tablet and mobile. Test at 1440, 768, and 390 during extraction.
614
644
  - **Don't forget smooth scroll libraries.** Check for Lenis (`.lenis` class), Locomotive Scroll, or similar. Default browser scrolling feels noticeably different and the user will spot it immediately.
615
645
  - **Don't dispatch builders without a spec file.** The spec file forces exhaustive extraction and creates an auditable artifact. Skipping it means the builder gets whatever you can fit in a prompt from memory.
@@ -617,6 +647,7 @@ These are lessons from previous failed clones — each one cost hours of rework:
617
647
  ## Completion
618
648
 
619
649
  When done, report:
650
+ - Multi-pass reconnaissance status (`docs/research/DOM_SKETCH.md` present; passes at **1440 / 768 / 390** as needed)
620
651
  - Total sections built
621
652
  - Total components created
622
653
  - Total spec files written (should match components)