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.
@@ -28,25 +28,23 @@ Before reconnaissance, write or update:
28
28
 
29
29
  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.
30
30
 
31
- **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.
32
-
33
31
  ---
34
32
 
35
33
  ## Scope Defaults
36
34
 
37
35
  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:
38
36
 
39
- - **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.
37
+ - **Fidelity level:** Pixel-perfect exact match in colors, spacing, typography, animations
40
38
  - **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
41
39
  - **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
42
40
  - **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.
43
- - **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.
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**. Note in `docs/research/LAUNCHFRAME.md` which marks and assets are **original brand** versus **layout-only** extraction.
44
42
 
45
43
  If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
46
44
 
47
45
  ## Pre-Flight
48
46
 
49
- 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.
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. **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.
50
48
  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.
51
49
  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.
52
50
  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>/`.
@@ -82,8 +80,6 @@ Look at each section and judge its complexity. A simple banner with a heading an
82
80
 
83
81
  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.
84
82
 
85
- **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.
86
-
87
83
  **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.
88
84
 
89
85
  **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.
@@ -157,11 +153,48 @@ Navigate to the target URL with browser MCP.
157
153
 
158
154
  Follow **§0 (Visual crawl priority)** during the entire reconnaissance pass: images and backgrounds → SVGs/icons → motion/animations — before spending time on secondary copy tweaks.
159
155
 
156
+ ### Multi-pass DOM reconnaissance (mandatory)
157
+
158
+ **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.
159
+
160
+ **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):
161
+
162
+ 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).
163
+ 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.
164
+ 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.
165
+ 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.
166
+
167
+ **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.
168
+
160
169
  ### Screenshots
161
170
  - Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
162
171
  - Save to `docs/design-references/` with descriptive names
163
172
  - These are your master reference — builders will receive section-specific crops/screenshots later
164
173
 
174
+ ### Browser MCP: pixel-perfect capture
175
+
176
+ MCP-driven inspection must be **pixel-perfect**, not “close.” Apply this on **every** reconnaissance width and again in Phase 5.
177
+
178
+ - **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.
179
+ - **Zoom:** Ensure **browser zoom is 100%** (not 90%/110%). Zoom breaks `px` parity and screenshots.
180
+ - **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).
181
+ - **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.
182
+ - **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.
183
+ - **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.
184
+ - **Screenshots vs. DOM:** Screenshots are for **diffing**; the **spec values** still come from **computed style + rect**, not from eyeballing pixels.
185
+
186
+ **Viewport diagnostic** (run via browser MCP after each resize):
187
+
188
+ ```javascript
189
+ JSON.stringify({
190
+ innerWidth: window.innerWidth,
191
+ clientWidth: document.documentElement.clientWidth,
192
+ clientHeight: document.documentElement.clientHeight,
193
+ devicePixelRatio: window.devicePixelRatio,
194
+ scrollY: window.scrollY
195
+ });
196
+ ```
197
+
165
198
  ### Global Extraction
166
199
  Extract these from the page before doing anything else:
167
200
 
@@ -199,8 +232,6 @@ This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose
199
232
  - Mobile: 390px
200
233
  - At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
201
234
 
202
- Re-check **all three widths** again in **Phase 5: Visual QA Diff** so tablet regressions are not skipped.
203
-
204
235
  Save all findings to `docs/research/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
205
236
 
206
237
  ### Chrome MCP: precise motion & animation extraction
@@ -209,11 +240,11 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
209
240
 
210
241
  **Rules:**
211
242
 
212
- - **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).
243
+ - **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).
213
244
  - **`@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.”
214
- - **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.
245
+ - **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).
215
246
  - **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).
216
- - **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.
247
+ - **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).
217
248
  - **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.
218
249
 
219
250
  **Motion audit script** (run via Chrome MCP; optional `rootSelector` limits to a subtree):
@@ -247,8 +278,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
247
278
  }
248
279
 
249
280
  const animated = [];
250
- // Include `root` — querySelectorAll('*') misses animations on the section container itself
251
- const scope = [root, ...root.querySelectorAll('*')];
281
+ const scope = root.querySelectorAll('*');
252
282
  for (const el of scope) {
253
283
  const cs = getComputedStyle(el);
254
284
  const animName = cs.animationName;
@@ -260,7 +290,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
260
290
  const hasTrans =
261
291
  cs.transitionProperty &&
262
292
  cs.transitionProperty !== 'none' &&
263
- transDurs.some((d) => d !== '0s' && d !== '0ms');
293
+ transDurs.some((d) => d !== '0s');
264
294
  if (!hasAnim && !hasTrans) continue;
265
295
 
266
296
  animated.push({
@@ -288,9 +318,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
288
318
  opacity: cs.opacity,
289
319
  willChange: cs.willChange,
290
320
  viewTimelineName: cs.viewTimelineName,
291
- scrollTimelineName: cs.scrollTimelineName,
292
- viewTimelineNameRaw: cs.getPropertyValue('view-timeline-name'),
293
- scrollTimelineNameRaw: cs.getPropertyValue('scroll-timeline-name')
321
+ scrollTimelineName: cs.scrollTimelineName
294
322
  });
295
323
  }
296
324
 
@@ -377,7 +405,7 @@ For each section, use browser MCP to extract everything:
377
405
 
378
406
  1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to `docs/design-references/`.
379
407
 
380
- 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.
408
+ 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:
381
409
 
382
410
  ```javascript
383
411
  // Per-component extraction — run via browser MCP
@@ -404,7 +432,6 @@ For each section, use browser MCP to extract everything:
404
432
  function extractStyles(element) {
405
433
  const cs = getComputedStyle(element);
406
434
  const styles = {};
407
- // Heuristic filter — for layout-audits, re-add any dropped `auto` / `normal` / transparent values the spec calls out as significant
408
435
  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; });
409
436
  return styles;
410
437
  }
@@ -568,17 +595,16 @@ After all sections are built and merged, wire everything together in `src/app/pa
568
595
 
569
596
  After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
570
597
 
571
- 1. Open the original site and your clone side-by-side (or take screenshots at the same viewport widths)
598
+ 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.
572
599
  2. Compare section by section, top to bottom, at desktop (1440px)
573
- 3. Compare again at tablet (768px) same widths as **Responsive sweep**
574
- 4. Compare again at mobile (390px)
575
- 5. For each discrepancy found:
600
+ 3. Compare at tablet (768px) and again at mobile (390px)
601
+ 4. For each discrepancy found:
576
602
  - Check the component spec file — was the value extracted correctly?
577
603
  - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
578
604
  - If the spec was right but the builder got it wrong: fix the component to match the spec
579
- 6. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
580
- 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.
581
- 8. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
605
+ 5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
606
+ 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.
607
+ 7. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
582
608
 
583
609
  Only after this visual + motion QA pass is the clone complete.
584
610
 
@@ -586,16 +612,18 @@ Only after this visual + motion QA pass is the clone complete.
586
612
 
587
613
  Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
588
614
 
615
+ - [ ] **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
589
616
  - [ ] Spec file written to `docs/research/components/<name>.spec.md` with ALL sections filled
590
- - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
617
+ - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated — **verbatim**, including fractional px and color functions
618
+ - [ ] **MCP pixel-perfect pass:** viewports **1440 / 768 / 390**, **100% zoom**, viewport diagnostic recorded; **`getBoundingClientRect()`** and **`::before`/`::after`** captured where they affect layout or visuals
591
619
  - [ ] Interaction model is identified and documented (static / click / scroll / time)
592
620
  - [ ] For stateful components: every state's content and styles are captured
593
621
  - [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
594
622
  - [ ] For hover states: before/after values and transition timing are recorded
595
623
  - [ ] 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
596
624
  - [ ] All images in the section are identified (including overlays and layered compositions)
597
- - [ ] Responsive behavior is documented for desktop, tablet, and mobile (1440 / 768 / 390)
598
- - [ ] 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)
625
+ - [ ] Responsive behavior is documented for **1440 / 768 / 390**
626
+ - [ ] Text content is verbatim from the site, not paraphrased
599
627
  - [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
600
628
 
601
629
  ## What NOT to Do
@@ -612,6 +640,8 @@ These are lessons from previous failed clones — each one cost hours of rework:
612
640
  - **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
613
641
  - **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.
614
642
  - **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.
643
+ - **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.
644
+ - **Don't mix zoom levels or viewport widths** between reference extraction and QA — you will false-fail or false-pass pixel diffs.
615
645
  - **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.
616
646
  - **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.
617
647
  - **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.
@@ -619,6 +649,7 @@ These are lessons from previous failed clones — each one cost hours of rework:
619
649
  ## Completion
620
650
 
621
651
  When done, report:
652
+ - Multi-pass reconnaissance status (`docs/research/DOM_SKETCH.md` present; passes at **1440 / 768 / 390** as needed)
622
653
  - Total sections built
623
654
  - Total components created
624
655
  - Total spec files written (should match components)
@@ -23,25 +23,23 @@ Before reconnaissance, write or update:
23
23
 
24
24
  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.
25
25
 
26
- **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.
27
-
28
26
  ---
29
27
 
30
28
  ## Scope Defaults
31
29
 
32
30
  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:
33
31
 
34
- - **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.
32
+ - **Fidelity level:** Pixel-perfect exact match in colors, spacing, typography, animations
35
33
  - **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
36
34
  - **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
37
35
  - **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.
38
- - **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.
36
+ - **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.
39
37
 
40
38
  If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
41
39
 
42
40
  ## Pre-Flight
43
41
 
44
- 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.
42
+ 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.
45
43
  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.
46
44
  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.
47
45
  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>/`.
@@ -77,8 +75,6 @@ Look at each section and judge its complexity. A simple banner with a heading an
77
75
 
78
76
  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.
79
77
 
80
- **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.
81
-
82
78
  **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.
83
79
 
84
80
  **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.
@@ -152,11 +148,48 @@ Navigate to the target URL with browser MCP.
152
148
 
153
149
  Follow **§0 (Visual crawl priority)** during the entire reconnaissance pass: images and backgrounds → SVGs/icons → motion/animations — before spending time on secondary copy tweaks.
154
150
 
151
+ ### Multi-pass DOM reconnaissance (mandatory)
152
+
153
+ **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.
154
+
155
+ **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):
156
+
157
+ 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).
158
+ 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.
159
+ 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.
160
+ 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.
161
+
162
+ **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.
163
+
155
164
  ### Screenshots
156
165
  - Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
157
166
  - Save to `docs/design-references/` with descriptive names
158
167
  - These are your master reference — builders will receive section-specific crops/screenshots later
159
168
 
169
+ ### Browser MCP: pixel-perfect capture
170
+
171
+ MCP-driven inspection must be **pixel-perfect**, not “close.” Apply this on **every** reconnaissance width and again in Phase 5.
172
+
173
+ - **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.
174
+ - **Zoom:** Ensure **browser zoom is 100%** (not 90%/110%). Zoom breaks `px` parity and screenshots.
175
+ - **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).
176
+ - **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.
177
+ - **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.
178
+ - **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.
179
+ - **Screenshots vs. DOM:** Screenshots are for **diffing**; the **spec values** still come from **computed style + rect**, not from eyeballing pixels.
180
+
181
+ **Viewport diagnostic** (run via browser MCP after each resize):
182
+
183
+ ```javascript
184
+ JSON.stringify({
185
+ innerWidth: window.innerWidth,
186
+ clientWidth: document.documentElement.clientWidth,
187
+ clientHeight: document.documentElement.clientHeight,
188
+ devicePixelRatio: window.devicePixelRatio,
189
+ scrollY: window.scrollY
190
+ });
191
+ ```
192
+
160
193
  ### Global Extraction
161
194
  Extract these from the page before doing anything else:
162
195
 
@@ -194,8 +227,6 @@ This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose
194
227
  - Mobile: 390px
195
228
  - At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
196
229
 
197
- Re-check **all three widths** again in **Phase 5: Visual QA Diff** so tablet regressions are not skipped.
198
-
199
230
  Save all findings to `docs/research/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
200
231
 
201
232
  ### Chrome MCP: precise motion & animation extraction
@@ -204,11 +235,11 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
204
235
 
205
236
  **Rules:**
206
237
 
207
- - **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).
238
+ - **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).
208
239
  - **`@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.”
209
- - **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.
240
+ - **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).
210
241
  - **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).
211
- - **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.
242
+ - **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).
212
243
  - **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.
213
244
 
214
245
  **Motion audit script** (run via Chrome MCP; optional `rootSelector` limits to a subtree):
@@ -242,8 +273,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
242
273
  }
243
274
 
244
275
  const animated = [];
245
- // Include `root` — querySelectorAll('*') misses animations on the section container itself
246
- const scope = [root, ...root.querySelectorAll('*')];
276
+ const scope = root.querySelectorAll('*');
247
277
  for (const el of scope) {
248
278
  const cs = getComputedStyle(el);
249
279
  const animName = cs.animationName;
@@ -255,7 +285,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
255
285
  const hasTrans =
256
286
  cs.transitionProperty &&
257
287
  cs.transitionProperty !== 'none' &&
258
- transDurs.some((d) => d !== '0s' && d !== '0ms');
288
+ transDurs.some((d) => d !== '0s');
259
289
  if (!hasAnim && !hasTrans) continue;
260
290
 
261
291
  animated.push({
@@ -283,9 +313,7 @@ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/clic
283
313
  opacity: cs.opacity,
284
314
  willChange: cs.willChange,
285
315
  viewTimelineName: cs.viewTimelineName,
286
- scrollTimelineName: cs.scrollTimelineName,
287
- viewTimelineNameRaw: cs.getPropertyValue('view-timeline-name'),
288
- scrollTimelineNameRaw: cs.getPropertyValue('scroll-timeline-name')
316
+ scrollTimelineName: cs.scrollTimelineName
289
317
  });
290
318
  }
291
319
 
@@ -372,7 +400,7 @@ For each section, use browser MCP to extract everything:
372
400
 
373
401
  1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to `docs/design-references/`.
374
402
 
375
- 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.
403
+ 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:
376
404
 
377
405
  ```javascript
378
406
  // Per-component extraction — run via browser MCP
@@ -399,7 +427,6 @@ For each section, use browser MCP to extract everything:
399
427
  function extractStyles(element) {
400
428
  const cs = getComputedStyle(element);
401
429
  const styles = {};
402
- // Heuristic filter — for layout-audits, re-add any dropped `auto` / `normal` / transparent values the spec calls out as significant
403
430
  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; });
404
431
  return styles;
405
432
  }
@@ -563,17 +590,16 @@ After all sections are built and merged, wire everything together in `src/app/pa
563
590
 
564
591
  After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
565
592
 
566
- 1. Open the original site and your clone side-by-side (or take screenshots at the same viewport widths)
593
+ 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.
567
594
  2. Compare section by section, top to bottom, at desktop (1440px)
568
- 3. Compare again at tablet (768px) same widths as **Responsive sweep**
569
- 4. Compare again at mobile (390px)
570
- 5. For each discrepancy found:
595
+ 3. Compare at tablet (768px) and again at mobile (390px)
596
+ 4. For each discrepancy found:
571
597
  - Check the component spec file — was the value extracted correctly?
572
598
  - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
573
599
  - If the spec was right but the builder got it wrong: fix the component to match the spec
574
- 6. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
575
- 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.
576
- 8. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
600
+ 5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
601
+ 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.
602
+ 7. Verify smooth scroll feels right, header transitions work, tab switching works, stagger and scroll-driven reveals match the reference
577
603
 
578
604
  Only after this visual + motion QA pass is the clone complete.
579
605
 
@@ -581,16 +607,18 @@ Only after this visual + motion QA pass is the clone complete.
581
607
 
582
608
  Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
583
609
 
610
+ - [ ] **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
584
611
  - [ ] Spec file written to `docs/research/components/<name>.spec.md` with ALL sections filled
585
- - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
612
+ - [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated — **verbatim**, including fractional px and color functions
613
+ - [ ] **MCP pixel-perfect pass:** viewports **1440 / 768 / 390**, **100% zoom**, viewport diagnostic recorded; **`getBoundingClientRect()`** and **`::before`/`::after`** captured where they affect layout or visuals
586
614
  - [ ] Interaction model is identified and documented (static / click / scroll / time)
587
615
  - [ ] For stateful components: every state's content and styles are captured
588
616
  - [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
589
617
  - [ ] For hover states: before/after values and transition timing are recorded
590
618
  - [ ] 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
591
619
  - [ ] All images in the section are identified (including overlays and layered compositions)
592
- - [ ] Responsive behavior is documented for desktop, tablet, and mobile (1440 / 768 / 390)
593
- - [ ] 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)
620
+ - [ ] Responsive behavior is documented for **1440 / 768 / 390**
621
+ - [ ] Text content is verbatim from the site, not paraphrased
594
622
  - [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
595
623
 
596
624
  ## What NOT to Do
@@ -607,6 +635,8 @@ These are lessons from previous failed clones — each one cost hours of rework:
607
635
  - **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
608
636
  - **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.
609
637
  - **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.
638
+ - **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.
639
+ - **Don't mix zoom levels or viewport widths** between reference extraction and QA — you will false-fail or false-pass pixel diffs.
610
640
  - **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.
611
641
  - **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.
612
642
  - **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.
@@ -614,6 +644,7 @@ These are lessons from previous failed clones — each one cost hours of rework:
614
644
  ## Completion
615
645
 
616
646
  When done, report:
647
+ - Multi-pass reconnaissance status (`docs/research/DOM_SKETCH.md` present; passes at **1440 / 768 / 390** as needed)
617
648
  - Total sections built
618
649
  - Total components created
619
650
  - Total spec files written (should match components)