launchframe 0.4.3 → 0.4.4

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.
@@ -24,7 +24,9 @@ Before reconnaissance, write or update:
24
24
 
25
25
  ## SaaS copy overlay (Phase 4 assembly and final polish)
26
26
 
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. Respect third-party brands.
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
+
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.
28
30
 
29
31
  ---
30
32
 
@@ -32,16 +34,17 @@ After structure and styles match the reference, apply the **SaaS idea** to hero,
32
34
 
33
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:
34
36
 
35
- - **Fidelity level:** Pixel-perfect exact match in colors, spacing, typography, animations
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.
36
38
  - **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
37
39
  - **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
38
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.
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
42
 
40
43
  If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
41
44
 
42
45
  ## Pre-Flight
43
46
 
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 MCP. If none are detected, ask the user which browser tool they have and how to connect it. This skill cannot work without browser automation.
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
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.
46
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.
47
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>/`.
@@ -57,7 +60,7 @@ When you traverse the DOM and the Network panel, do **not** treat all nodes equa
57
60
 
58
61
  1. **Images (raster + video stills)** — Enumerate `<img>`, `<picture>`, responsive `srcset`, `data-*` lazy URLs, **computed `background-image`** on the element and parents (including pseudo-elements), mask images, `<video poster>`, hero media. **Scrape:** download binary assets to `public/images/` (or `public/videos/`) with stable paths referenced in specs. **Create** a replacement PNG/WebP/SVG only when the asset is blocked (CORS, auth cookie, 403), ephemeral, or impossible to URL-fetch — use a high-DPI screenshot crop, traced artwork, or CSS gradient approximation, and mark `ASSET_SOURCE: generated` in the component spec with a short reason.
59
62
  2. **SVGs & iconography** — Inline `<svg>`, sprite `symbol` defs, **SVG used as masks/filters**, icon fonts (prefer path extraction). Convert to `@/components/icons.tsx` (or section-local components) with meaningful names. Prioritize crisp edges and correct `viewBox` over shrinking bundle size during emulation.
60
- 3. **Motion & animation** — CSS `@keyframes`, `animation`, `animation-timeline`, `transition`, `transform`, will-change hints; JS-driven motion (carousel timing, IntersectionObserver reveals); libraries (GSAP, Framer, Lottie JSON, Lenis). Capture **numbers** (ms, easing curves, stagger, scroll thresholds), not adjectives. Include **reduced-motion** behavior if present.
63
+ 3. **Motion & animation** — CSS `@keyframes`, `animation`, `animation-timeline` / `view-timeline` / `animation-range`, `transition`, `transform`, `transform-origin`, will-change; JS-driven motion (carousel timing, IntersectionObserver reveals); libraries (GSAP, Framer, Lottie JSON, Lenis). Capture **numbers** (ms, `cubic-bezier()`, `steps()`, stagger, scroll thresholds, **named keyframe blocks**), not adjectives — paste **verbatim** `cssText` for relevant `@keyframes` into specs when obtainable. Include **reduced-motion** (`matchMedia('(prefers-reduced-motion: reduce)'))` behavior if present.
61
64
 
62
65
  Only after the above are accounted for should you spend cycle time on minor text or non-visual refactors. A perfect grid with missing hero art and dead animation still fails the clone.
63
66
 
@@ -77,6 +80,8 @@ Look at each section and judge its complexity. A simple banner with a heading an
77
80
 
78
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.
79
82
 
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
+
80
85
  **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.
81
86
 
82
87
  **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.
@@ -192,8 +197,113 @@ This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose
192
197
  - Mobile: 390px
193
198
  - At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
194
199
 
200
+ Re-check **all three widths** again in **Phase 5: Visual QA Diff** so tablet regressions are not skipped.
201
+
195
202
  Save all findings to `docs/research/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
196
203
 
204
+ ### Chrome MCP: precise motion & animation extraction
205
+
206
+ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/click/hover sweeps so you capture **live computed values**, not guesses from DevTools screenshots alone.
207
+
208
+ **Rules:**
209
+
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).
211
+ - **`@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.
213
+ - **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.
215
+ - **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
+
217
+ **Motion audit script** (run via Chrome MCP; optional `rootSelector` limits to a subtree):
218
+
219
+ ```javascript
220
+ (function motionAudit(rootSelector) {
221
+ const root = rootSelector ? document.querySelector(rootSelector) : document.body;
222
+ if (!root) return JSON.stringify({ error: 'root not found: ' + rootSelector });
223
+
224
+ function safeRules(sheet) {
225
+ try {
226
+ return [...sheet.cssRules];
227
+ } catch {
228
+ return [];
229
+ }
230
+ }
231
+
232
+ const walkKeyframes = (rules, out) => {
233
+ for (const rule of rules) {
234
+ if (rule.type === CSSRule.KEYFRAMES_RULE) {
235
+ out.push({ name: rule.name, cssText: rule.cssText });
236
+ } else if (rule.type === CSSRule.MEDIA_RULE && rule.cssRules) {
237
+ walkKeyframes(rule.cssRules, out);
238
+ }
239
+ }
240
+ };
241
+
242
+ const keyframes = [];
243
+ for (const sheet of document.styleSheets) {
244
+ walkKeyframes(safeRules(sheet), keyframes);
245
+ }
246
+
247
+ const animated = [];
248
+ // Include `root` — querySelectorAll('*') misses animations on the section container itself
249
+ const scope = [root, ...root.querySelectorAll('*')];
250
+ for (const el of scope) {
251
+ const cs = getComputedStyle(el);
252
+ const animName = cs.animationName;
253
+ const hasAnim = animName && animName !== 'none';
254
+ const transDurs = (cs.transitionDuration || '')
255
+ .split(',')
256
+ .map((s) => s.trim())
257
+ .filter(Boolean);
258
+ const hasTrans =
259
+ cs.transitionProperty &&
260
+ cs.transitionProperty !== 'none' &&
261
+ transDurs.some((d) => d !== '0s' && d !== '0ms');
262
+ if (!hasAnim && !hasTrans) continue;
263
+
264
+ animated.push({
265
+ hint: el.tagName.toLowerCase() + (el.className
266
+ ? '.' + String(el.className).trim().split(/\s+/).slice(0, 4).join('.')
267
+ : ''),
268
+ animation: cs.animation,
269
+ animationName: cs.animationName,
270
+ animationDuration: cs.animationDuration,
271
+ animationTimingFunction: cs.animationTimingFunction,
272
+ animationDelay: cs.animationDelay,
273
+ animationIterationCount: cs.animationIterationCount,
274
+ animationDirection: cs.animationDirection,
275
+ animationFillMode: cs.animationFillMode,
276
+ animationPlayState: cs.animationPlayState,
277
+ animationTimeline: cs.animationTimeline,
278
+ animationRange: cs.animationRange,
279
+ transition: cs.transition,
280
+ transitionProperty: cs.transitionProperty,
281
+ transitionDuration: cs.transitionDuration,
282
+ transitionTimingFunction: cs.transitionTimingFunction,
283
+ transitionDelay: cs.transitionDelay,
284
+ transform: cs.transform,
285
+ transformOrigin: cs.transformOrigin,
286
+ opacity: cs.opacity,
287
+ willChange: cs.willChange,
288
+ viewTimelineName: cs.viewTimelineName,
289
+ scrollTimelineName: cs.scrollTimelineName,
290
+ viewTimelineNameRaw: cs.getPropertyValue('view-timeline-name'),
291
+ scrollTimelineNameRaw: cs.getPropertyValue('scroll-timeline-name')
292
+ });
293
+ }
294
+
295
+ return JSON.stringify(
296
+ {
297
+ prefersReducedMotion: window.matchMedia('(prefers-reduced-motion: reduce)').matches,
298
+ keyframes,
299
+ animatedElements: animated
300
+ },
301
+ null,
302
+ 2
303
+ );
304
+ })(''); // Pass section selector string, e.g. 'section.hero', instead of ''
305
+ ```
306
+
197
307
  ### Page Topology
198
308
  Map out every distinct section of the page from top to bottom. Give each a working name. Document:
199
309
  - Their visual order
@@ -265,7 +375,7 @@ For each section, use browser MCP to extract everything:
265
375
 
266
376
  1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to `docs/design-references/`.
267
377
 
268
- 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:
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.
269
379
 
270
380
  ```javascript
271
381
  // Per-component extraction — run via browser MCP
@@ -284,13 +394,15 @@ For each section, use browser MCP to extract everything:
284
394
  'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
285
395
  'boxShadow','overflow','overflowX','overflowY',
286
396
  'position','top','right','bottom','left','zIndex',
287
- 'opacity','transform','transition','cursor',
397
+ 'opacity','transform','transformOrigin','transition','transitionProperty','transitionDuration','transitionTimingFunction','transitionDelay',
398
+ 'animation','animationName','animationDuration','animationTimingFunction','animationDelay','animationIterationCount','animationDirection','animationFillMode','animationPlayState','animationTimeline','animationRange','viewTimelineName','scrollTimelineName','cursor',
288
399
  'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
289
400
  'whiteSpace','textOverflow','WebkitLineClamp'
290
401
  ];
291
402
  function extractStyles(element) {
292
403
  const cs = getComputedStyle(element);
293
404
  const styles = {};
405
+ // Heuristic filter — for layout-audits, re-add any dropped `auto` / `normal` / transparent values the spec calls out as significant
294
406
  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; });
295
407
  return styles;
296
408
  }
@@ -363,6 +475,15 @@ For each section (or sub-component, if you're breaking it up), create a spec fil
363
475
  ### <Child element N>
364
476
  ...
365
477
 
478
+ ## Motion & animation (exact — from Chrome MCP `getComputedStyle` + stylesheet rules)
479
+
480
+ - **Keyframe names in use:** ...
481
+ - **Full `@keyframes` blocks** (paste `cssText` or equivalent); note **cross-origin** gaps and how you filled them
482
+ - **Per-element:** shorthand/longhand `animation` and `transition` values **verbatim** for resting state
483
+ - **Scroll/view timelines:** timeline name, range, scroll container, snap/observer thresholds
484
+ - **Libraries:** Lenis / GSAP / Framer / Lottie — hooks, init pattern, timing copied from reference
485
+ - **`prefers-reduced-motion`:** matched behavior on the reference
486
+
366
487
  ## States & Behaviors
367
488
 
368
489
  ### <Behavior name, e.g., "Scroll-triggered floating mode">
@@ -447,15 +568,17 @@ After assembly, do NOT declare the clone complete. Take side-by-side comparison
447
568
 
448
569
  1. Open the original site and your clone side-by-side (or take screenshots at the same viewport widths)
449
570
  2. Compare section by section, top to bottom, at desktop (1440px)
450
- 3. Compare again at mobile (390px)
451
- 4. For each discrepancy found:
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:
452
574
  - Check the component spec file — was the value extracted correctly?
453
575
  - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
454
576
  - If the spec was right but the builder got it wrong: fix the component to match the spec
455
- 5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
456
- 6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
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
457
580
 
458
- Only after this visual QA pass is the clone complete.
581
+ Only after this visual + motion QA pass is the clone complete.
459
582
 
460
583
  ## Pre-Dispatch Checklist
461
584
 
@@ -467,9 +590,10 @@ Before dispatching ANY builder agent, verify you can check every box. If you can
467
590
  - [ ] For stateful components: every state's content and styles are captured
468
591
  - [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
469
592
  - [ ] For hover states: before/after values and transition timing are recorded
593
+ - [ ] 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
470
594
  - [ ] All images in the section are identified (including overlays and layered compositions)
471
- - [ ] Responsive behavior is documented for at least desktop and mobile
472
- - [ ] Text content is verbatim from the site, not paraphrased
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)
473
597
  - [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
474
598
 
475
599
  ## What NOT to Do
@@ -21,7 +21,9 @@ Before reconnaissance, write or update:
21
21
 
22
22
  ## SaaS copy overlay (Phase 4 assembly and final polish)
23
23
 
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. Respect third-party brands.
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
+
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.
25
27
 
26
28
  ---
27
29
 
@@ -29,16 +31,17 @@ After structure and styles match the reference, apply the **SaaS idea** to hero,
29
31
 
30
32
  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:
31
33
 
32
- - **Fidelity level:** Pixel-perfect exact match in colors, spacing, typography, animations
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.
33
35
  - **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
34
36
  - **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
35
37
  - **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
39
 
37
40
  If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
38
41
 
39
42
  ## Pre-Flight
40
43
 
41
- 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 MCP. If none are detected, ask the user which browser tool they have and how to connect it. This skill cannot work without browser automation.
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
45
  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.
43
46
  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.
44
47
  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>/`.
@@ -54,7 +57,7 @@ When you traverse the DOM and the Network panel, do **not** treat all nodes equa
54
57
 
55
58
  1. **Images (raster + video stills)** — Enumerate `<img>`, `<picture>`, responsive `srcset`, `data-*` lazy URLs, **computed `background-image`** on the element and parents (including pseudo-elements), mask images, `<video poster>`, hero media. **Scrape:** download binary assets to `public/images/` (or `public/videos/`) with stable paths referenced in specs. **Create** a replacement PNG/WebP/SVG only when the asset is blocked (CORS, auth cookie, 403), ephemeral, or impossible to URL-fetch — use a high-DPI screenshot crop, traced artwork, or CSS gradient approximation, and mark `ASSET_SOURCE: generated` in the component spec with a short reason.
56
59
  2. **SVGs & iconography** — Inline `<svg>`, sprite `symbol` defs, **SVG used as masks/filters**, icon fonts (prefer path extraction). Convert to `@/components/icons.tsx` (or section-local components) with meaningful names. Prioritize crisp edges and correct `viewBox` over shrinking bundle size during emulation.
57
- 3. **Motion & animation** — CSS `@keyframes`, `animation`, `animation-timeline`, `transition`, `transform`, will-change hints; JS-driven motion (carousel timing, IntersectionObserver reveals); libraries (GSAP, Framer, Lottie JSON, Lenis). Capture **numbers** (ms, easing curves, stagger, scroll thresholds), not adjectives. Include **reduced-motion** behavior if present.
60
+ 3. **Motion & animation** — CSS `@keyframes`, `animation`, `animation-timeline` / `view-timeline` / `animation-range`, `transition`, `transform`, `transform-origin`, will-change; JS-driven motion (carousel timing, IntersectionObserver reveals); libraries (GSAP, Framer, Lottie JSON, Lenis). Capture **numbers** (ms, `cubic-bezier()`, `steps()`, stagger, scroll thresholds, **named keyframe blocks**), not adjectives — paste **verbatim** `cssText` for relevant `@keyframes` into specs when obtainable. Include **reduced-motion** (`matchMedia('(prefers-reduced-motion: reduce)'))` behavior if present.
58
61
 
59
62
  Only after the above are accounted for should you spend cycle time on minor text or non-visual refactors. A perfect grid with missing hero art and dead animation still fails the clone.
60
63
 
@@ -74,6 +77,8 @@ Look at each section and judge its complexity. A simple banner with a heading an
74
77
 
75
78
  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.
76
79
 
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
+
77
82
  **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.
78
83
 
79
84
  **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.
@@ -189,8 +194,113 @@ This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose
189
194
  - Mobile: 390px
190
195
  - At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
191
196
 
197
+ Re-check **all three widths** again in **Phase 5: Visual QA Diff** so tablet regressions are not skipped.
198
+
192
199
  Save all findings to `docs/research/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
193
200
 
201
+ ### Chrome MCP: precise motion & animation extraction
202
+
203
+ Use **evaluate script** (or equivalent) in Chrome MCP **during** the scroll/click/hover sweeps so you capture **live computed values**, not guesses from DevTools screenshots alone.
204
+
205
+ **Rules:**
206
+
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).
208
+ - **`@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.
210
+ - **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.
212
+ - **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
+
214
+ **Motion audit script** (run via Chrome MCP; optional `rootSelector` limits to a subtree):
215
+
216
+ ```javascript
217
+ (function motionAudit(rootSelector) {
218
+ const root = rootSelector ? document.querySelector(rootSelector) : document.body;
219
+ if (!root) return JSON.stringify({ error: 'root not found: ' + rootSelector });
220
+
221
+ function safeRules(sheet) {
222
+ try {
223
+ return [...sheet.cssRules];
224
+ } catch {
225
+ return [];
226
+ }
227
+ }
228
+
229
+ const walkKeyframes = (rules, out) => {
230
+ for (const rule of rules) {
231
+ if (rule.type === CSSRule.KEYFRAMES_RULE) {
232
+ out.push({ name: rule.name, cssText: rule.cssText });
233
+ } else if (rule.type === CSSRule.MEDIA_RULE && rule.cssRules) {
234
+ walkKeyframes(rule.cssRules, out);
235
+ }
236
+ }
237
+ };
238
+
239
+ const keyframes = [];
240
+ for (const sheet of document.styleSheets) {
241
+ walkKeyframes(safeRules(sheet), keyframes);
242
+ }
243
+
244
+ const animated = [];
245
+ // Include `root` — querySelectorAll('*') misses animations on the section container itself
246
+ const scope = [root, ...root.querySelectorAll('*')];
247
+ for (const el of scope) {
248
+ const cs = getComputedStyle(el);
249
+ const animName = cs.animationName;
250
+ const hasAnim = animName && animName !== 'none';
251
+ const transDurs = (cs.transitionDuration || '')
252
+ .split(',')
253
+ .map((s) => s.trim())
254
+ .filter(Boolean);
255
+ const hasTrans =
256
+ cs.transitionProperty &&
257
+ cs.transitionProperty !== 'none' &&
258
+ transDurs.some((d) => d !== '0s' && d !== '0ms');
259
+ if (!hasAnim && !hasTrans) continue;
260
+
261
+ animated.push({
262
+ hint: el.tagName.toLowerCase() + (el.className
263
+ ? '.' + String(el.className).trim().split(/\s+/).slice(0, 4).join('.')
264
+ : ''),
265
+ animation: cs.animation,
266
+ animationName: cs.animationName,
267
+ animationDuration: cs.animationDuration,
268
+ animationTimingFunction: cs.animationTimingFunction,
269
+ animationDelay: cs.animationDelay,
270
+ animationIterationCount: cs.animationIterationCount,
271
+ animationDirection: cs.animationDirection,
272
+ animationFillMode: cs.animationFillMode,
273
+ animationPlayState: cs.animationPlayState,
274
+ animationTimeline: cs.animationTimeline,
275
+ animationRange: cs.animationRange,
276
+ transition: cs.transition,
277
+ transitionProperty: cs.transitionProperty,
278
+ transitionDuration: cs.transitionDuration,
279
+ transitionTimingFunction: cs.transitionTimingFunction,
280
+ transitionDelay: cs.transitionDelay,
281
+ transform: cs.transform,
282
+ transformOrigin: cs.transformOrigin,
283
+ opacity: cs.opacity,
284
+ willChange: cs.willChange,
285
+ viewTimelineName: cs.viewTimelineName,
286
+ scrollTimelineName: cs.scrollTimelineName,
287
+ viewTimelineNameRaw: cs.getPropertyValue('view-timeline-name'),
288
+ scrollTimelineNameRaw: cs.getPropertyValue('scroll-timeline-name')
289
+ });
290
+ }
291
+
292
+ return JSON.stringify(
293
+ {
294
+ prefersReducedMotion: window.matchMedia('(prefers-reduced-motion: reduce)').matches,
295
+ keyframes,
296
+ animatedElements: animated
297
+ },
298
+ null,
299
+ 2
300
+ );
301
+ })(''); // Pass section selector string, e.g. 'section.hero', instead of ''
302
+ ```
303
+
194
304
  ### Page Topology
195
305
  Map out every distinct section of the page from top to bottom. Give each a working name. Document:
196
306
  - Their visual order
@@ -262,7 +372,7 @@ For each section, use browser MCP to extract everything:
262
372
 
263
373
  1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to `docs/design-references/`.
264
374
 
265
- 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:
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.
266
376
 
267
377
  ```javascript
268
378
  // Per-component extraction — run via browser MCP
@@ -281,13 +391,15 @@ For each section, use browser MCP to extract everything:
281
391
  'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
282
392
  'boxShadow','overflow','overflowX','overflowY',
283
393
  'position','top','right','bottom','left','zIndex',
284
- 'opacity','transform','transition','cursor',
394
+ 'opacity','transform','transformOrigin','transition','transitionProperty','transitionDuration','transitionTimingFunction','transitionDelay',
395
+ 'animation','animationName','animationDuration','animationTimingFunction','animationDelay','animationIterationCount','animationDirection','animationFillMode','animationPlayState','animationTimeline','animationRange','viewTimelineName','scrollTimelineName','cursor',
285
396
  'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
286
397
  'whiteSpace','textOverflow','WebkitLineClamp'
287
398
  ];
288
399
  function extractStyles(element) {
289
400
  const cs = getComputedStyle(element);
290
401
  const styles = {};
402
+ // Heuristic filter — for layout-audits, re-add any dropped `auto` / `normal` / transparent values the spec calls out as significant
291
403
  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; });
292
404
  return styles;
293
405
  }
@@ -360,6 +472,15 @@ For each section (or sub-component, if you're breaking it up), create a spec fil
360
472
  ### <Child element N>
361
473
  ...
362
474
 
475
+ ## Motion & animation (exact — from Chrome MCP `getComputedStyle` + stylesheet rules)
476
+
477
+ - **Keyframe names in use:** ...
478
+ - **Full `@keyframes` blocks** (paste `cssText` or equivalent); note **cross-origin** gaps and how you filled them
479
+ - **Per-element:** shorthand/longhand `animation` and `transition` values **verbatim** for resting state
480
+ - **Scroll/view timelines:** timeline name, range, scroll container, snap/observer thresholds
481
+ - **Libraries:** Lenis / GSAP / Framer / Lottie — hooks, init pattern, timing copied from reference
482
+ - **`prefers-reduced-motion`:** matched behavior on the reference
483
+
363
484
  ## States & Behaviors
364
485
 
365
486
  ### <Behavior name, e.g., "Scroll-triggered floating mode">
@@ -444,15 +565,17 @@ After assembly, do NOT declare the clone complete. Take side-by-side comparison
444
565
 
445
566
  1. Open the original site and your clone side-by-side (or take screenshots at the same viewport widths)
446
567
  2. Compare section by section, top to bottom, at desktop (1440px)
447
- 3. Compare again at mobile (390px)
448
- 4. For each discrepancy found:
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:
449
571
  - Check the component spec file — was the value extracted correctly?
450
572
  - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
451
573
  - If the spec was right but the builder got it wrong: fix the component to match the spec
452
- 5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
453
- 6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
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
454
577
 
455
- Only after this visual QA pass is the clone complete.
578
+ Only after this visual + motion QA pass is the clone complete.
456
579
 
457
580
  ## Pre-Dispatch Checklist
458
581
 
@@ -464,9 +587,10 @@ Before dispatching ANY builder agent, verify you can check every box. If you can
464
587
  - [ ] For stateful components: every state's content and styles are captured
465
588
  - [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
466
589
  - [ ] For hover states: before/after values and transition timing are recorded
590
+ - [ ] 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
467
591
  - [ ] All images in the section are identified (including overlays and layered compositions)
468
- - [ ] Responsive behavior is documented for at least desktop and mobile
469
- - [ ] Text content is verbatim from the site, not paraphrased
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)
470
594
  - [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
471
595
 
472
596
  ## What NOT to Do
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchframe",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "description": "Scaffold a Next.js app from a reference URL plus your SaaS idea — AI-ready website cloning",
6
6
  "author": "JCodesMore",