Skip to content

Clone any website with one command using AI coding agents

refactor: centralize skills for four supported agents (#115)

JCodesMore5a19ae520df4
diff --git a/.claude/skills/clone-website/SKILL.md b/.agents/skills/clone-website/SKILL.md
similarity index 97%
rename from .claude/skills/clone-website/SKILL.md
rename to .agents/skills/clone-website/SKILL.md
index 189f76b2..007d7e10 100644
--- a/.claude/skills/clone-website/SKILL.md
+++ b/.agents/skills/clone-website/SKILL.md
@@ -1,13 +1,11 @@
---
name: clone-website
-description: Reverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", "pixel-perfect clone". Provide one or more target URLs as arguments.
-argument-hint: "<url1> [<url2> ...]"
-user-invocable: true
+description: Reverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", or "pixel-perfect clone". The request must include one or more target URLs.
---
# Clone Website
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
+You are about to reverse-engineer and rebuild **the target URL or URLs in the user's request** as pixel-perfect clones.
When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
@@ -15,7 +13,7 @@ This is not a two-phase process (inspect then build). You are a **foreman walkin
## Scope Defaults
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
+The target is whatever page the requested URL resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
@@ -53,13 +51,15 @@ Routing defaults:
## Pre-Flight
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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
+2. Parse the target URL or URLs from the user's request. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
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.
4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
+Before the inspection pass, read [references/inspection-guide.md](references/inspection-guide.md) for the reusable visual, component, layout, and technical audit checklist.
+
## Guiding Principles
These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
diff --git a/docs/research/INSPECTION_GUIDE.md b/.agents/skills/clone-website/references/inspection-guide.md
similarity index 100%
rename from docs/research/INSPECTION_GUIDE.md
rename to .agents/skills/clone-website/references/inspection-guide.md
diff --git a/.aider.conf.yml b/.aider.conf.yml
deleted file mode 100644
index 4994bc24..00000000
--- a/.aider.conf.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-read:
- - AGENTS.md
- - docs/research/INSPECTION_GUIDE.md
diff --git a/.amazonq/cli-agents/clone-website.json b/.amazonq/cli-agents/clone-website.json
deleted file mode 100644
index 536d4bd9..00000000
--- a/.amazonq/cli-agents/clone-website.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "clone-website",
- "description": "Reverse-engineer and clone one or more websites as pixel-perfect replicas",
- "prompt": "\n# Clone Website\n\nYou are about to reverse-engineer and rebuild **the target URL or URLs provided by the user** as pixel-perfect clones.\n\nWhen multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.\n\nThis is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.\n\n## Scope Defaults\n\nThe target is whatever page `the target URL or URLs provided by the user` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:\n\n- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations\n- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes\n- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit\n- **Customization:** None — pure emulation\n\nIf the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.\n\n## Output Isolation and Route Preservation\n\nTreat every target URL as durable project output, not as permission to replace whatever was built previously.\n\nChoose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.\n\nThen assign each target:\n\n- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.\n- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.\n- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.\n- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.\n- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.\n- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.\n- A Next.js route file.\n\nAll paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.\n\nRouting defaults:\n\n- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.\n- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.\n- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.\n- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.\n- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.\n\n## Pre-Flight\n\n1. **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.\n2. Parse `the target URL or URLs provided by the user` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.\n3. 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.\n4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.\n5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.\n6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.\n7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.\n\n## Guiding Principles\n\nThese are the truths that separate a successful clone from a \"close enough\" mess. Internalize them — they should inform every decision you make.\n\n### 1. Completeness Beats Speed\n\nEvery builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.\n\n### 2. Small Tasks, Perfect Results\n\nWhen an agent gets \"build the entire features section,\" it glosses over details — it approximates spacing, guesses font sizes, and produces something \"close enough\" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.\n\nLook at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.\n\n**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with \"but it's all related.\"\n\n### 3. Real Content, Real Assets\n\nExtract 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.\n\n**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.\n\n### 4. Foundation First\n\nNothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.\n\n### 5. Extract How It Looks AND How It Behaves\n\nA website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.\n\nFor every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not \"it looks like 16px\" — extract the actual computed value. Not \"the nav changes on scroll\" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).\n\nExamples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:\n- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold\n- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)\n- Sections that snap into place on scroll (`scroll-snap-type`)\n- Parallax layers that move at different rates than the scroll\n- Hover states that animate (not just change — the transition duration and easing matter)\n- Dropdowns, modals, accordions with enter/exit animations\n- Scroll-driven progress indicators or opacity transitions\n- Auto-playing carousels or cycling content\n- Dark-to-light (or any theme) transitions between page sections\n- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions\n- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)\n- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers\n\n### 6. Identify the Interaction Model Before Building\n\nThis is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**\n\nHow to determine this:\n1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.\n2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.\n3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.\n4. Document the interaction model explicitly in the component spec: \"INTERACTION MODEL: scroll-driven with IntersectionObserver\" or \"INTERACTION MODEL: click-to-switch with opacity transition.\"\n\nA section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.\n\n### 7. Extract Every State, Not Just the Default\n\nMany components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.\n\nFor tabbed/stateful content:\n- Click each tab/button via browser MCP\n- Extract the content, images, and card data for EACH state\n- Record which content belongs to which state\n- Note the transition animation between states (opacity, slide, fade, etc.)\n\nFor scroll-dependent elements:\n- Capture computed styles at scroll position 0 (initial state)\n- Scroll past the trigger threshold and capture computed styles again (scrolled state)\n- Diff the two to identify exactly which CSS properties change\n- Record the transition CSS (duration, easing, properties)\n- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)\n\n### 8. Spec Files Are the Source of Truth\n\nEvery component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.\n\nThe spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.\n\n### 9. Build Must Always Compile\n\nEvery builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.\n\n## Phase 1: Reconnaissance\n\nNavigate to the target URL with browser MCP.\n\n### Screenshots\n- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports\n- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names\n- These are your master reference — builders will receive section-specific crops/screenshots later\n\n### Global Extraction\nExtract these from the page before doing anything else:\n\n**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.\n\n**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.\n\n**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.\n\n**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.\n\n### Mandatory Interaction Sweep\n\nThis is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.\n\n**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:\n- Does the header change appearance? Record the scroll position where it triggers.\n- Do elements animate into view? Record which ones and the animation type.\n- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.\n- Are there scroll-snap points? Record which containers.\n- Is there a smooth scroll library active? Check for non-native scroll behavior.\n\n**Click sweep:** Click every element that looks interactive:\n- Every button, tab, pill, link, card\n- Record what happens: does content change? Does a modal open? Does a dropdown appear?\n- For tabs/pills: click EACH ONE and record the content that appears for each state\n\n**Hover sweep:** Hover over every element that might have hover states:\n- Buttons, cards, links, images, nav items\n- Record what changes: color, scale, shadow, underline, opacity\n\n**Responsive sweep:** Test at 3 viewport widths via browser MCP:\n- Desktop: 1440px\n- Tablet: 768px\n- Mobile: 390px\n- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.\n\nSave all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.\n\n### Page Topology\nMap out every distinct section of the page from top to bottom. Give each a working name. Document:\n- Their visual order\n- Which are fixed/sticky overlays vs. flow content\n- The overall page layout (scroll container, column structure, z-index layers)\n- Dependencies between sections (e.g., a floating nav that overlays everything)\n- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)\n\nSave this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.\n\n## Phase 2: Foundation Build\n\nThis is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:\n\n1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.\n2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.\n3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.\n4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).\n5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.\n6. Verify every previously existing route still builds, then run `npm run build`.\n\n### Asset Discovery Script Pattern\n\nUse browser MCP to enumerate all assets on the page:\n\n```javascript\n// Run this via browser MCP to discover all assets\nJSON.stringify({\n images: [...document.querySelectorAll('img')].map(img => ({\n src: img.src || img.currentSrc,\n alt: img.alt,\n width: img.naturalWidth,\n height: img.naturalHeight,\n // Include parent info to detect layered compositions\n parentClasses: img.parentElement?.className,\n siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,\n position: getComputedStyle(img).position,\n zIndex: getComputedStyle(img).zIndex\n })),\n videos: [...document.querySelectorAll('video')].map(v => ({\n src: v.src || v.querySelector('source')?.src,\n poster: v.poster,\n autoplay: v.autoplay,\n loop: v.loop,\n muted: v.muted\n })),\n backgroundImages: [...document.querySelectorAll('*')].filter(el => {\n const bg = getComputedStyle(el).backgroundImage;\n return bg && bg !== 'none';\n }).map(el => ({\n url: getComputedStyle(el).backgroundImage,\n element: el.tagName + '.' + el.className?.split(' ')[0]\n })),\n svgCount: document.querySelectorAll('svg').length,\n fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],\n favicons: [...document.querySelectorAll('link[rel*=\"icon\"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))\n});\n```\n\nThen use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.\n\n## Phase 3: Component Specification & Dispatch\n\nThis is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.\n\n### Step 1: Extract\n\nFor each section, use browser MCP to extract everything:\n\n1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.\n\n2. **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:\n\n```javascript\n// Per-component extraction — run via browser MCP\n// Replace SELECTOR with the actual CSS selector for the component\n(function(selector) {\n const el = document.querySelector(selector);\n if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });\n const props = [\n 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',\n 'textTransform','textDecoration','backgroundColor','background',\n 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',\n 'margin','marginTop','marginRight','marginBottom','marginLeft',\n 'width','height','maxWidth','minWidth','maxHeight','minHeight',\n 'display','flexDirection','justifyContent','alignItems','gap',\n 'gridTemplateColumns','gridTemplateRows',\n 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',\n 'boxShadow','overflow','overflowX','overflowY',\n 'position','top','right','bottom','left','zIndex',\n 'opacity','transform','transition','cursor',\n 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',\n 'whiteSpace','textOverflow','WebkitLineClamp'\n ];\n function extractStyles(element) {\n const cs = getComputedStyle(element);\n const styles = {};\n 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; });\n return styles;\n }\n function walk(element, depth) {\n if (depth > 4) return null;\n const children = [...element.children];\n return {\n tag: element.tagName.toLowerCase(),\n classes: element.className?.toString().split(' ').slice(0, 5).join(' '),\n text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,\n styles: extractStyles(element),\n images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,\n childCount: children.length,\n children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)\n };\n }\n return JSON.stringify(walk(el, 0), null, 2);\n})('SELECTOR');\n```\n\n3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:\n\n```javascript\n// State A: capture styles at current state (e.g., scroll position 0)\n// Then trigger the state change (scroll, click, hover via browser MCP)\n// State B: re-run the extraction script on the same element\n// The diff between A and B IS the behavior specification\n```\n\nRecord the diff explicitly: \"Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS.\"\n\n4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.\n\n5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).\n\n6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).\n\n### Step 2: Write the Component Spec File\n\nFor each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.\n\n**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`\n\n**Template:**\n\n```markdown\n# <ComponentName> Specification\n\n## Overview\n- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`\n- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`\n- **Interaction model:** <static | click-driven | scroll-driven | time-driven>\n\n## DOM Structure\n<Describe the element hierarchy — what contains what>\n\n## Computed Styles (exact values from getComputedStyle)\n\n### Container\n- display: ...\n- padding: ...\n- maxWidth: ...\n- (every relevant property with exact values)\n\n### <Child element 1>\n- fontSize: ...\n- color: ...\n- (every relevant property)\n\n### <Child element N>\n...\n\n## States & Behaviors\n\n### <Behavior name, e.g., \"Scroll-triggered floating mode\">\n- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin \"-30% 0px\", click on .tab-button, hover>\n- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0\n- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px\n- **Transition:** transition: all 0.3s ease\n- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>\n\n### Hover states\n- **<Element>:** <property>: <before> → <after>, transition: <value>\n\n## Per-State Content (if applicable)\n\n### State: \"Featured\"\n- Title: \"...\"\n- Subtitle: \"...\"\n- Cards: [{ title, description, image, link }, ...]\n\n### State: \"Productivity\"\n- Title: \"...\"\n- Cards: [...]\n\n## Assets\n- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`\n- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`\n- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module\n\n## Text Content (verbatim)\n<All text content, copy-pasted from the live site>\n\n## Responsive Behavior\n- **Desktop (1440px):** <layout description>\n- **Tablet (768px):** <what changes — e.g., \"maintains 2-column, gap reduces to 16px\">\n- **Mobile (390px):** <what changes — e.g., \"stacks to single column, images full-width\">\n- **Breakpoint:** layout switches at ~<N>px\n```\n\nFill every section. If a section doesn't apply (e.g., no states for a static footer), write \"N/A\" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.\n\n### Step 3: Dispatch Builders\n\nBased on complexity, dispatch builder agent(s) in worktree(s):\n\n**Simple section** (1-2 sub-components): One builder agent gets the entire section.\n\n**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.\n\n**What every builder agent receives:**\n- The full contents of its component spec file (inline in the prompt — don't say \"go read the spec file\")\n- Path to the section screenshot in the page's namespaced screenshot root\n- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)\n- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)\n- Instruction to verify with `npx tsc --noEmit` before finishing\n- For responsive behavior: the specific breakpoint values and what changes\n\n**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.\n\n### Step 4: Merge\n\nAs builder agents complete their work:\n- Merge their worktree branches into main\n- You have full context on what each agent built, so resolve any conflicts intelligently\n- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace\n- After each merge, verify the build still passes: `npm run build`\n- If a merge introduces type errors, fix them immediately\n\nThe extract → spec → dispatch → merge cycle continues until all sections are built.\n\n## Phase 4: Page Assembly\n\nAfter all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:\n\n- Import all section components\n- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)\n- Connect real content to component props\n- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)\n- Confirm all routes that existed before this run are still present and were not unintentionally changed\n- Verify: `npm run build` passes clean\n\n## Phase 5: Visual QA Diff\n\nAfter assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:\n\n1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)\n2. Compare section by section, top to bottom, at desktop (1440px)\n3. Compare again at mobile (390px)\n4. For each discrepancy found:\n - Check the component spec file — was the value extracted correctly?\n - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component\n - If the spec was right but the builder got it wrong: fix the component to match the spec\n5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements\n6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play\n\nOnly after this visual QA pass is the clone complete.\n\n## Pre-Dispatch Checklist\n\nBefore dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.\n\n- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled\n- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated\n- [ ] Interaction model is identified and documented (static / click / scroll / time)\n- [ ] For stateful components: every state's content and styles are captured\n- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded\n- [ ] For hover states: before/after values and transition timing are recorded\n- [ ] All images in the section are identified (including overlays and layered compositions)\n- [ ] Responsive behavior is documented for at least desktop and mobile\n- [ ] Text content is verbatim from the site, not paraphrased\n- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split\n\n## What NOT to Do\n\nThese are lessons from previous failed clones — each one cost hours of rework:\n\n- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.\n- **Don't extract only the default state.** If there are tabs showing \"Featured\" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.\n- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.\n- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.\n- **Don't approximate CSS classes.** \"It looks like `text-lg`\" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.\n- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.\n- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.\n- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never \"see DESIGN_TOKENS.md for colors.\" The builder should have zero need to read external docs.\n- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n\n## Completion\n\nWhen done, report:\n- Source URL to destination-route mapping for every page built\n- Existing routes preserved and any explicitly approved replacements\n- Total sections built\n- Total components created\n- Total spec files written (should match components)\n- Total assets downloaded (images, videos, SVGs, fonts)\n- Build status (`npm run build` result)\n- Visual QA results (any remaining discrepancies)\n- Any known gaps or limitations\n",
- "fileContext": [
- "AGENTS.md",
- "docs/research/**"
- ]
-}
diff --git a/.amazonq/rules/project.md b/.amazonq/rules/project.md
deleted file mode 100644
index 8a9cb3fc..00000000
--- a/.amazonq/rules/project.md
+++ /dev/null
@@ -1,151 +0,0 @@
-<!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
-
-<!-- BEGIN:nextjs-agent-rules -->
-
-# This is NOT the Next.js you know
-
-This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
-
-This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
-
-<!-- END:nextjs-agent-rules -->
-
-# Website Reverse-Engineer Template
-
-## What This Is
-A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — just run `/clone-website <url1> [<url2> ...]`.
-
-## Tech Stack
-- **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
-- **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
-- **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
-- **Styling:** Tailwind CSS v4 with oklch design tokens
-- **Deployment:** Vercel
-
-## Commands
-- `npm run dev` — Start dev server
-- `npm run build` — Production build
-- `npm run lint` — ESLint check
-- `npm run typecheck` — TypeScript check
-- `npm run check` — Run lint + typecheck + build
-
-## Code Style
-- TypeScript strict mode, no `any`
-- Named exports, PascalCase components, camelCase utils
-- Tailwind utility classes, no inline styles
-- 2-space indentation
-- Responsive: mobile-first
-
-## Design Principles
-- **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
-- **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
-- **Real content** — use actual text and assets from the target site, not placeholders
-- **Beauty-first** — every pixel matters
-
-## Project Structure
-```
-src/
- app/ # Next.js routes
- components/ # React components
- ui/ # shadcn/ui primitives
- icons.tsx # Extracted SVG icons as React components
- lib/
- utils.ts # cn() utility (shadcn)
- types/ # TypeScript interfaces
- hooks/ # Custom React hooks
-public/
- images/ # Downloaded images from target site
- videos/ # Downloaded videos from target site
- seo/ # Favicons, OG images, webmanifest
-docs/
- research/ # Inspection output (design tokens, components, layout)
- design-references/ # Screenshots and visual references
-scripts/ # Asset download scripts
-```
-
-## MOST IMPORTANT NOTES
-- When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
-- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
-- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
-
-# Website Inspection Guide
-
-## How to Reverse-Engineer Any Website
-
-This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
-
-## Phase 1: Visual Audit
-
-### Screenshots to Capture
-- [ ] Every distinct page — desktop, tablet, mobile
-- [ ] Dark mode variants (if applicable)
-- [ ] Light mode variants (if applicable)
-- [ ] Key interaction states (hover, active, open menus, modals)
-- [ ] Loading/skeleton states
-- [ ] Empty states
-- [ ] Error states
-
-### Design Tokens to Extract
-- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
-- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
-- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
-- [ ] **Border radius** — buttons, cards, avatars, inputs
-- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
-- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
-- [ ] **Icons** — which icon library? custom SVGs? sizes?
-- [ ] **Avatars** — sizes, shapes, fallback behavior
-- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
-- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
-
-## Phase 2: Component Inventory
-
-For each distinct UI component, document:
-1. **Name** — what would you call this component?
-2. **Structure** — what HTML elements / child components does it contain?
-3. **Variants** — does it have different sizes, colors, or states?
-4. **States** — default, hover, active, disabled, loading, error, empty
-5. **Responsive behavior** — how does it change at different breakpoints?
-6. **Interactions** — click, hover, focus, keyboard navigation
-7. **Animations** — transitions, entrance/exit animations, micro-interactions
-
-### Common Components to Look For
-- Navigation (top bar, sidebar, bottom bar)
-- Cards / list items
-- Buttons and links
-- Forms and inputs
-- Modals and dialogs
-- Dropdowns and menus
-- Tabs and segmented controls
-- Avatars and user badges
-- Loading skeletons
-- Toast notifications
-- Tooltips and popovers
-
-## Phase 3: Layout Architecture
-
-- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
-- [ ] **Column layout** — how many columns at each breakpoint?
-- [ ] **Max-width** — main content area max-width
-- [ ] **Sticky elements** — header, sidebar, floating buttons
-- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
-- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
-
-## Phase 4: Technical Stack Analysis
-
-- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
-- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
-- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
-- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
-- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
-- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF
-- [ ] **Animation library** — Framer Motion, GSAP, CSS transitions only
-
-## Phase 5: Documentation Output
-
-After inspection, create these files in `docs/research/`:
-1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
-2. `COMPONENT_INVENTORY.md` — Every component with structure notes
-3. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
-4. `INTERACTION_PATTERNS.md` — Animations, transitions, hover states
-5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents
diff --git a/.augment/commands/clone-website.md b/.augment/commands/clone-website.md
deleted file mode 100644
index 3eb92db4..00000000
--- a/.augment/commands/clone-website.md
+++ /dev/null
@@ -1,507 +0,0 @@
----
-description: "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
-argument-hint: "<url1> [<url2> ...]"
----
-<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md — do not edit directly.
- Run `node scripts/sync-skills.mjs` to regenerate. -->
-
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.claude/commands/clone-website.md b/.claude/commands/clone-website.md
new file mode 100644
index 00000000..0d663388
--- /dev/null
+++ b/.claude/commands/clone-website.md
@@ -0,0 +1,6 @@
+---
+description: Reverse-engineer and clone one or more websites as pixel-perfect Next.js replicas. Use when the user asks to clone, replicate, rebuild, reverse-engineer, or copy a website.
+argument-hint: "<url1> [<url2> ...]"
+---
+
+Read `${CLAUDE_PROJECT_DIR}/.agents/skills/clone-website/SKILL.md` completely, then follow it for the target URL or URLs in the user's request. When invoked directly, `$ARGUMENTS` contains those URL arguments.
diff --git a/.cline/skills/clone-website/SKILL.md b/.cline/skills/clone-website/SKILL.md
deleted file mode 100644
index d3b5af3d..00000000
--- a/.cline/skills/clone-website/SKILL.md
+++ /dev/null
@@ -1,504 +0,0 @@
----
-name: clone-website
-description: "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
----
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **the target URL or URLs provided by the user** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `the target URL or URLs provided by the user` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `the target URL or URLs provided by the user` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.clinerules b/.clinerules
deleted file mode 100644
index 8a9cb3fc..00000000
--- a/.clinerules
+++ /dev/null
@@ -1,151 +0,0 @@
-<!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
-
-<!-- BEGIN:nextjs-agent-rules -->
-
-# This is NOT the Next.js you know
-
-This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
-
-This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
-
-<!-- END:nextjs-agent-rules -->
-
-# Website Reverse-Engineer Template
-
-## What This Is
-A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — just run `/clone-website <url1> [<url2> ...]`.
-
-## Tech Stack
-- **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
-- **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
-- **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
-- **Styling:** Tailwind CSS v4 with oklch design tokens
-- **Deployment:** Vercel
-
-## Commands
-- `npm run dev` — Start dev server
-- `npm run build` — Production build
-- `npm run lint` — ESLint check
-- `npm run typecheck` — TypeScript check
-- `npm run check` — Run lint + typecheck + build
-
-## Code Style
-- TypeScript strict mode, no `any`
-- Named exports, PascalCase components, camelCase utils
-- Tailwind utility classes, no inline styles
-- 2-space indentation
-- Responsive: mobile-first
-
-## Design Principles
-- **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
-- **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
-- **Real content** — use actual text and assets from the target site, not placeholders
-- **Beauty-first** — every pixel matters
-
-## Project Structure
-```
-src/
- app/ # Next.js routes
- components/ # React components
- ui/ # shadcn/ui primitives
- icons.tsx # Extracted SVG icons as React components
- lib/
- utils.ts # cn() utility (shadcn)
- types/ # TypeScript interfaces
- hooks/ # Custom React hooks
-public/
- images/ # Downloaded images from target site
- videos/ # Downloaded videos from target site
- seo/ # Favicons, OG images, webmanifest
-docs/
- research/ # Inspection output (design tokens, components, layout)
- design-references/ # Screenshots and visual references
-scripts/ # Asset download scripts
-```
-
-## MOST IMPORTANT NOTES
-- When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
-- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
-- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
-
-# Website Inspection Guide
-
-## How to Reverse-Engineer Any Website
-
-This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
-
-## Phase 1: Visual Audit
-
-### Screenshots to Capture
-- [ ] Every distinct page — desktop, tablet, mobile
-- [ ] Dark mode variants (if applicable)
-- [ ] Light mode variants (if applicable)
-- [ ] Key interaction states (hover, active, open menus, modals)
-- [ ] Loading/skeleton states
-- [ ] Empty states
-- [ ] Error states
-
-### Design Tokens to Extract
-- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
-- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
-- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
-- [ ] **Border radius** — buttons, cards, avatars, inputs
-- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
-- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
-- [ ] **Icons** — which icon library? custom SVGs? sizes?
-- [ ] **Avatars** — sizes, shapes, fallback behavior
-- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
-- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
-
-## Phase 2: Component Inventory
-
-For each distinct UI component, document:
-1. **Name** — what would you call this component?
-2. **Structure** — what HTML elements / child components does it contain?
-3. **Variants** — does it have different sizes, colors, or states?
-4. **States** — default, hover, active, disabled, loading, error, empty
-5. **Responsive behavior** — how does it change at different breakpoints?
-6. **Interactions** — click, hover, focus, keyboard navigation
-7. **Animations** — transitions, entrance/exit animations, micro-interactions
-
-### Common Components to Look For
-- Navigation (top bar, sidebar, bottom bar)
-- Cards / list items
-- Buttons and links
-- Forms and inputs
-- Modals and dialogs
-- Dropdowns and menus
-- Tabs and segmented controls
-- Avatars and user badges
-- Loading skeletons
-- Toast notifications
-- Tooltips and popovers
-
-## Phase 3: Layout Architecture
-
-- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
-- [ ] **Column layout** — how many columns at each breakpoint?
-- [ ] **Max-width** — main content area max-width
-- [ ] **Sticky elements** — header, sidebar, floating buttons
-- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
-- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
-
-## Phase 4: Technical Stack Analysis
-
-- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
-- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
-- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
-- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
-- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
-- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF
-- [ ] **Animation library** — Framer Motion, GSAP, CSS transitions only
-
-## Phase 5: Documentation Output
-
-After inspection, create these files in `docs/research/`:
-1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
-2. `COMPONENT_INVENTORY.md` — Every component with structure notes
-3. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
-4. `INTERACTION_PATTERNS.md` — Animations, transitions, hover states
-5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents
diff --git a/.codex/skills/clone-website/SKILL.md b/.codex/skills/clone-website/SKILL.md
deleted file mode 100644
index 189f76b2..00000000
--- a/.codex/skills/clone-website/SKILL.md
+++ /dev/null
@@ -1,506 +0,0 @@
----
-name: clone-website
-description: Reverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", "pixel-perfect clone". Provide one or more target URLs as arguments.
-argument-hint: "<url1> [<url2> ...]"
-user-invocable: true
----
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.continue/commands/clone-website.md b/.continue/commands/clone-website.md
deleted file mode 100644
index e461e2b9..00000000
--- a/.continue/commands/clone-website.md
+++ /dev/null
@@ -1,508 +0,0 @@
----
-name: clone-website
-description: "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
-invokable: true
----
-<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md — do not edit directly.
- Run `node scripts/sync-skills.mjs` to regenerate. -->
-
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.continue/rules/project.md b/.continue/rules/project.md
deleted file mode 100644
index 7eebb09e..00000000
--- a/.continue/rules/project.md
+++ /dev/null
@@ -1,155 +0,0 @@
-<!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
-
----
-description: Project conventions for AI Website Clone Template
-alwaysApply: true
----
-<!-- BEGIN:nextjs-agent-rules -->
-
-# This is NOT the Next.js you know
-
-This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
-
-This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
-
-<!-- END:nextjs-agent-rules -->
-
-# Website Reverse-Engineer Template
-
-## What This Is
-A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — just run `/clone-website <url1> [<url2> ...]`.
-
-## Tech Stack
-- **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
-- **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
-- **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
-- **Styling:** Tailwind CSS v4 with oklch design tokens
-- **Deployment:** Vercel
-
-## Commands
-- `npm run dev` — Start dev server
-- `npm run build` — Production build
-- `npm run lint` — ESLint check
-- `npm run typecheck` — TypeScript check
-- `npm run check` — Run lint + typecheck + build
-
-## Code Style
-- TypeScript strict mode, no `any`
-- Named exports, PascalCase components, camelCase utils
-- Tailwind utility classes, no inline styles
-- 2-space indentation
-- Responsive: mobile-first
-
-## Design Principles
-- **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
-- **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
-- **Real content** — use actual text and assets from the target site, not placeholders
-- **Beauty-first** — every pixel matters
-
-## Project Structure
-```
-src/
- app/ # Next.js routes
- components/ # React components
- ui/ # shadcn/ui primitives
- icons.tsx # Extracted SVG icons as React components
- lib/
- utils.ts # cn() utility (shadcn)
- types/ # TypeScript interfaces
- hooks/ # Custom React hooks
-public/
- images/ # Downloaded images from target site
- videos/ # Downloaded videos from target site
- seo/ # Favicons, OG images, webmanifest
-docs/
- research/ # Inspection output (design tokens, components, layout)
- design-references/ # Screenshots and visual references
-scripts/ # Asset download scripts
-```
-
-## MOST IMPORTANT NOTES
-- When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
-- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
-- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
-
-# Website Inspection Guide
-
-## How to Reverse-Engineer Any Website
-
-This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
-
-## Phase 1: Visual Audit
-
-### Screenshots to Capture
-- [ ] Every distinct page — desktop, tablet, mobile
-- [ ] Dark mode variants (if applicable)
-- [ ] Light mode variants (if applicable)
-- [ ] Key interaction states (hover, active, open menus, modals)
-- [ ] Loading/skeleton states
-- [ ] Empty states
-- [ ] Error states
-
-### Design Tokens to Extract
-- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
-- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
-- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
-- [ ] **Border radius** — buttons, cards, avatars, inputs
-- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
-- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
-- [ ] **Icons** — which icon library? custom SVGs? sizes?
-- [ ] **Avatars** — sizes, shapes, fallback behavior
-- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
-- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
-
-## Phase 2: Component Inventory
-
-For each distinct UI component, document:
-1. **Name** — what would you call this component?
-2. **Structure** — what HTML elements / child components does it contain?
-3. **Variants** — does it have different sizes, colors, or states?
-4. **States** — default, hover, active, disabled, loading, error, empty
-5. **Responsive behavior** — how does it change at different breakpoints?
-6. **Interactions** — click, hover, focus, keyboard navigation
-7. **Animations** — transitions, entrance/exit animations, micro-interactions
-
-### Common Components to Look For
-- Navigation (top bar, sidebar, bottom bar)
-- Cards / list items
-- Buttons and links
-- Forms and inputs
-- Modals and dialogs
-- Dropdowns and menus
-- Tabs and segmented controls
-- Avatars and user badges
-- Loading skeletons
-- Toast notifications
-- Tooltips and popovers
-
-## Phase 3: Layout Architecture
-
-- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
-- [ ] **Column layout** — how many columns at each breakpoint?
-- [ ] **Max-width** — main content area max-width
-- [ ] **Sticky elements** — header, sidebar, floating buttons
-- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
-- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
-
-## Phase 4: Technical Stack Analysis
-
-- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
-- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
-- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
-- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
-- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
-- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF
-- [ ] **Animation library** — Framer Motion, GSAP, CSS transitions only
-
-## Phase 5: Documentation Output
-
-After inspection, create these files in `docs/research/`:
-1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
-2. `COMPONENT_INVENTORY.md` — Every component with structure notes
-3. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
-4. `INTERACTION_PATTERNS.md` — Animations, transitions, hover states
-5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents
diff --git a/.cursor/commands/clone-website.md b/.cursor/commands/clone-website.md
deleted file mode 100644
index e0dbcaf2..00000000
--- a/.cursor/commands/clone-website.md
+++ /dev/null
@@ -1,503 +0,0 @@
-<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md — do not edit directly.
- Run `node scripts/sync-skills.mjs` to regenerate. -->
-
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **the target URL or URLs provided by the user** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `the target URL or URLs provided by the user` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `the target URL or URLs provided by the user` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.cursor/rules/project.mdc b/.cursor/rules/project.mdc
deleted file mode 100644
index 5ee6f7c8..00000000
--- a/.cursor/rules/project.mdc
+++ /dev/null
@@ -1,7 +0,0 @@
----
-description: Project conventions — see AGENTS.md for full details
-alwaysApply: true
----
-
-This project uses AGENTS.md as the single source of truth for all AI agent instructions.
-Cursor reads AGENTS.md automatically — see the project root for complete guidelines.
diff --git a/.dockerignore b/.dockerignore
index 6f4507bd..013ead73 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -28,21 +28,12 @@ Thumbs.db
*.swo
# Agent / AI tool configs (not needed at runtime)
+.agents
.claude
-.codex
.cursor
-.windsurf
-.gemini
-.continue
-.amazonq
-.augment
.opencode
-.aider.conf.yml
-.clinerules
-.windsurfrules
AGENTS.md
CLAUDE.md
-GEMINI.md
# Docs / research (large, not needed at runtime)
docs
diff --git a/.gemini/commands/clone-website.toml b/.gemini/commands/clone-website.toml
deleted file mode 100644
index 680d7dbf..00000000
--- a/.gemini/commands/clone-website.toml
+++ /dev/null
@@ -1,509 +0,0 @@
-# AUTO-GENERATED from .claude/skills/clone-website/SKILL.md
-# Run `node scripts/sync-skills.mjs` to regenerate.
-
-description = "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
-name = "clone-website"
-
-prompt = '''
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **{{args}}** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `{{args}}` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `{{args}}` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
-
-'''
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
deleted file mode 100644
index 8a9cb3fc..00000000
--- a/.github/copilot-instructions.md
+++ /dev/null
@@ -1,151 +0,0 @@
-<!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
-
-<!-- BEGIN:nextjs-agent-rules -->
-
-# This is NOT the Next.js you know
-
-This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
-
-This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
-
-<!-- END:nextjs-agent-rules -->
-
-# Website Reverse-Engineer Template
-
-## What This Is
-A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — just run `/clone-website <url1> [<url2> ...]`.
-
-## Tech Stack
-- **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
-- **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
-- **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
-- **Styling:** Tailwind CSS v4 with oklch design tokens
-- **Deployment:** Vercel
-
-## Commands
-- `npm run dev` — Start dev server
-- `npm run build` — Production build
-- `npm run lint` — ESLint check
-- `npm run typecheck` — TypeScript check
-- `npm run check` — Run lint + typecheck + build
-
-## Code Style
-- TypeScript strict mode, no `any`
-- Named exports, PascalCase components, camelCase utils
-- Tailwind utility classes, no inline styles
-- 2-space indentation
-- Responsive: mobile-first
-
-## Design Principles
-- **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
-- **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
-- **Real content** — use actual text and assets from the target site, not placeholders
-- **Beauty-first** — every pixel matters
-
-## Project Structure
-```
-src/
- app/ # Next.js routes
- components/ # React components
- ui/ # shadcn/ui primitives
- icons.tsx # Extracted SVG icons as React components
- lib/
- utils.ts # cn() utility (shadcn)
- types/ # TypeScript interfaces
- hooks/ # Custom React hooks
-public/
- images/ # Downloaded images from target site
- videos/ # Downloaded videos from target site
- seo/ # Favicons, OG images, webmanifest
-docs/
- research/ # Inspection output (design tokens, components, layout)
- design-references/ # Screenshots and visual references
-scripts/ # Asset download scripts
-```
-
-## MOST IMPORTANT NOTES
-- When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
-- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
-- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
-
-# Website Inspection Guide
-
-## How to Reverse-Engineer Any Website
-
-This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
-
-## Phase 1: Visual Audit
-
-### Screenshots to Capture
-- [ ] Every distinct page — desktop, tablet, mobile
-- [ ] Dark mode variants (if applicable)
-- [ ] Light mode variants (if applicable)
-- [ ] Key interaction states (hover, active, open menus, modals)
-- [ ] Loading/skeleton states
-- [ ] Empty states
-- [ ] Error states
-
-### Design Tokens to Extract
-- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
-- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
-- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
-- [ ] **Border radius** — buttons, cards, avatars, inputs
-- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
-- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
-- [ ] **Icons** — which icon library? custom SVGs? sizes?
-- [ ] **Avatars** — sizes, shapes, fallback behavior
-- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
-- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
-
-## Phase 2: Component Inventory
-
-For each distinct UI component, document:
-1. **Name** — what would you call this component?
-2. **Structure** — what HTML elements / child components does it contain?
-3. **Variants** — does it have different sizes, colors, or states?
-4. **States** — default, hover, active, disabled, loading, error, empty
-5. **Responsive behavior** — how does it change at different breakpoints?
-6. **Interactions** — click, hover, focus, keyboard navigation
-7. **Animations** — transitions, entrance/exit animations, micro-interactions
-
-### Common Components to Look For
-- Navigation (top bar, sidebar, bottom bar)
-- Cards / list items
-- Buttons and links
-- Forms and inputs
-- Modals and dialogs
-- Dropdowns and menus
-- Tabs and segmented controls
-- Avatars and user badges
-- Loading skeletons
-- Toast notifications
-- Tooltips and popovers
-
-## Phase 3: Layout Architecture
-
-- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
-- [ ] **Column layout** — how many columns at each breakpoint?
-- [ ] **Max-width** — main content area max-width
-- [ ] **Sticky elements** — header, sidebar, floating buttons
-- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
-- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
-
-## Phase 4: Technical Stack Analysis
-
-- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
-- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
-- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
-- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
-- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
-- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF
-- [ ] **Animation library** — Framer Motion, GSAP, CSS transitions only
-
-## Phase 5: Documentation Output
-
-After inspection, create these files in `docs/research/`:
-1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
-2. `COMPONENT_INVENTORY.md` — Every component with structure notes
-3. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
-4. `INTERACTION_PATTERNS.md` — Animations, transitions, hover states
-5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents
diff --git a/.github/skills/clone-website/SKILL.md b/.github/skills/clone-website/SKILL.md
deleted file mode 100644
index 189f76b2..00000000
--- a/.github/skills/clone-website/SKILL.md
+++ /dev/null
@@ -1,506 +0,0 @@
----
-name: clone-website
-description: Reverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", "pixel-perfect clone". Provide one or more target URLs as arguments.
-argument-hint: "<url1> [<url2> ...]"
-user-invocable: true
----
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e5fc30b7..e9b51403 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,23 +23,6 @@ jobs:
node-version: 24
cache: npm
- - name: Verify generated files are in sync
- shell: bash
- run: |
- bash scripts/sync-agent-rules.sh
- node scripts/sync-skills.mjs
-
- if [[ -n "$(git status --porcelain=v1 --untracked-files=all)" ]]; then
- echo "::error::Generated files are out of sync with their sources (AGENTS.md / SKILL.md)."
- echo "Run the sync scripts locally and commit the result:"
- echo " bash scripts/sync-agent-rules.sh"
- echo " node scripts/sync-skills.mjs"
- git status --short
- git diff --stat
- exit 1
- fi
- echo "All generated files are in sync with their sources."
-
- name: Install dependencies
run: npm ci
diff --git a/.kiro/skills/clone-website/SKILL.md b/.kiro/skills/clone-website/SKILL.md
deleted file mode 100644
index 189f76b2..00000000
--- a/.kiro/skills/clone-website/SKILL.md
+++ /dev/null
@@ -1,506 +0,0 @@
----
-name: clone-website
-description: Reverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", "pixel-perfect clone". Provide one or more target URLs as arguments.
-argument-hint: "<url1> [<url2> ...]"
-user-invocable: true
----
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.opencode/commands/clone-website.md b/.opencode/commands/clone-website.md
deleted file mode 100644
index c8707c86..00000000
--- a/.opencode/commands/clone-website.md
+++ /dev/null
@@ -1,506 +0,0 @@
----
-description: "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
----
-<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md — do not edit directly.
- Run `node scripts/sync-skills.mjs` to regenerate. -->
-
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **$ARGUMENTS** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `$ARGUMENTS` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `$ARGUMENTS` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.roo/commands/clone-website.md b/.roo/commands/clone-website.md
deleted file mode 100644
index 31cbc3f9..00000000
--- a/.roo/commands/clone-website.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-description: "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
-argument-hint: "<url1> [<url2> ...]"
----
-<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md — do not edit directly.
- Run `node scripts/sync-skills.mjs` to regenerate. -->
-
-Use the `clone-website` skill for the target URL or URLs provided by the user. Load that skill and follow its workflow exactly.
diff --git a/.roo/skills/clone-website/SKILL.md b/.roo/skills/clone-website/SKILL.md
deleted file mode 100644
index d3b5af3d..00000000
--- a/.roo/skills/clone-website/SKILL.md
+++ /dev/null
@@ -1,504 +0,0 @@
----
-name: clone-website
-description: "Reverse-engineer and clone one or more websites as pixel-perfect replicas"
----
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **the target URL or URLs provided by the user** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `the target URL or URLs provided by the user` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `the target URL or URLs provided by the user` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.windsurf/workflows/clone-website.md b/.windsurf/workflows/clone-website.md
deleted file mode 100644
index e0dbcaf2..00000000
--- a/.windsurf/workflows/clone-website.md
+++ /dev/null
@@ -1,503 +0,0 @@
-<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md — do not edit directly.
- Run `node scripts/sync-skills.mjs` to regenerate. -->
-
-
-# Clone Website
-
-You are about to reverse-engineer and rebuild **the target URL or URLs provided by the user** as pixel-perfect clones.
-
-When multiple URLs are provided, preserve every pathname as a distinct route and isolate each target's research, screenshots, components, and assets. URLs that differ only by query string or fragment share a pathname, so resolve their route and state behavior explicitly in the output plan. Parallelize page work only after the shared foundation and output plan are fixed so concurrent builders cannot overwrite one another.
-
-This is not a two-phase process (inspect then build). You are a **foreman walking the job site** — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.
-
-## Scope Defaults
-
-The target is whatever page `the target URL or URLs provided by the user` resolves to. Clone exactly what's visible at that URL. Unless the user specifies otherwise, use these defaults:
-
-- **Fidelity level:** Pixel-perfect — exact match in colors, spacing, typography, animations
-- **In scope:** Visual layout and styling, component structure and interactions, responsive design, mock data for demo purposes
-- **Out of scope:** Real backend / database, authentication, real-time features, SEO optimization, accessibility audit
-- **Customization:** None — pure emulation
-
-If the user provides additional instructions (specific fidelity level, customizations, extra context), honor those over the defaults.
-
-## Output Isolation and Route Preservation
-
-Treat every target URL as durable project output, not as permission to replace whatever was built previously.
-
-Choose an `<app-root>` before extraction. For a single application, `<app-root>` is the repository root (`.`). If different origins need separate applications, require the user to provide or approve a prepared Next.js project root for each origin; verify each root builds independently, and never write one origin's output into another root.
-
-Then assign each target:
-
-- A collision-resistant `<site-key>`: a readable origin slug (including a non-default port) plus the first 8 lowercase hex characters of SHA-256 over the normalized origin.
-- A collision-resistant `<page-key>`: a segment-preserving readable pathname slug plus the first 8 lowercase hex characters of SHA-256 over the normalized pathname and any stateful query/fragment; use `root-<hash>` for `/`. Never rely on lossy character replacement alone.
-- An artifact root: `<app-root>/docs/research/<site-key>/<page-key>/`.
-- A screenshot root: `<app-root>/docs/design-references/<site-key>/<page-key>/`.
-- A component root: `<app-root>/src/components/sites/<site-key>/<page-key>/`, with genuinely shared same-site components under `<app-root>/src/components/sites/<site-key>/shared/`.
-- An asset root: `<app-root>/public/sites/<site-key>/<page-key>/`, with genuinely shared same-site assets under `<app-root>/public/sites/<site-key>/shared/`.
-- A Next.js route file.
-
-All paths in the remaining phases are relative to that target's `<app-root>`. Before writing, verify that every planned route, artifact root, screenshot root, component root, asset root, and downloader filename is unique or is an explicitly approved shared location.
-
-Routing defaults:
-
-- For the first single-URL clone in an untouched template, the existing scaffold at `src/app/page.tsx` may be replaced so the clone remains available at `/`.
-- For multiple URLs from the same origin, or any later clone added to a project that already contains cloned/user-authored pages, preserve the normalized source pathname as its App Router URL (for example, `/docs/intro` becomes `<app-root>/src/app/docs/intro/page.tsx`). Encode filesystem segment names that would invoke App Router syntax: escape a leading `_` or `@`, and literal parentheses or square brackets, with percent-encoded folder spellings rather than creating private folders, slots, route groups, or dynamic segments. Verify the built route resolves at the exact normalized URL before completion.
-- Inspect every existing `src/app/**/page.tsx` before writing. Never delete or replace a non-scaffold route, component tree, research folder, screenshot, or asset namespace unless the user explicitly approves that exact replacement.
-- If the planned route already exists, stop and ask whether to update that route, choose another route, or skip it.
-- URLs from different origins may require incompatible fonts, global CSS, layouts, and metadata. Before modifying files, ask whether the user wants separate prepared application roots (recommended) or an intentionally combined multi-site app with route-scoped styling. Do not create an unapproved monorepo or silently mix global foundations.
-
-## Pre-Flight
-
-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.
-2. Parse `the target URL or URLs provided by the user` as one or more URLs. Normalize and validate each URL; if any are invalid, ask the user to correct them before proceeding. For each valid URL, verify it is accessible via your browser MCP tool.
-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.
-4. Inventory existing routes (`src/app/**/page.tsx`), site component namespaces, research artifacts, screenshots, and public assets. Distinguish the untouched template scaffold from existing cloned or user-authored work.
-5. Write an output plan listing every target URL, `<app-root>`, `<site-key>`, `<page-key>`, destination route, artifact roots, and whether any shared foundation file must change. Resolve collisions across every planned output, same-path query/fragment behavior, and multi-origin layout decisions with the user before editing.
-6. Create only the planned per-page/per-site directories plus `scripts/` if needed. Use unique asset-download script names such as `scripts/download-assets-<site-key>-<page-key>.mjs`; do not overwrite another page's downloader.
-7. For multiple pages from one origin, build the shared foundation once, sequentially, before parallel page work. Optionally confirm whether to run page builders in parallel (recommended if resources allow) or sequentially to avoid overload.
-
-## Guiding Principles
-
-These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.
-
-### 1. Completeness Beats Speed
-
-Every builder agent must receive **everything** it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.
-
-### 2. Small Tasks, Perfect Results
-
-When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.
-
-Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.
-
-**Complexity budget rule:** If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."
-
-### 3. Real Content, Real Assets
-
-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.
-
-**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.
-
-### 4. Foundation First
-
-Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.
-
-### 5. Extract How It Looks AND How It Behaves
-
-A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.
-
-For every element, extract its **appearance** (exact computed CSS via `getComputedStyle()`) AND its **behavior** (what changes, what triggers the change, and how the transition happens). Not "it looks like 16px" — extract the actual computed value. Not "the nav changes on scroll" — document the exact trigger (scroll position, IntersectionObserver threshold, viewport intersection), the before and after states (both sets of CSS values), and the transition (duration, easing, CSS transition vs. JS-driven vs. CSS `animation-timeline`).
-
-Examples of behaviors to watch for — these are illustrative, not exhaustive. The page may do things not on this list, and you must catch those too:
-- A navbar that shrinks, changes background, or gains a shadow after scrolling past a threshold
-- Elements that animate into view when they enter the viewport (fade-up, slide-in, stagger delays)
-- Sections that snap into place on scroll (`scroll-snap-type`)
-- Parallax layers that move at different rates than the scroll
-- Hover states that animate (not just change — the transition duration and easing matter)
-- Dropdowns, modals, accordions with enter/exit animations
-- Scroll-driven progress indicators or opacity transitions
-- Auto-playing carousels or cycling content
-- Dark-to-light (or any theme) transitions between page sections
-- **Tabbed/pill content that cycles** — buttons that switch visible card sets with transitions
-- **Scroll-driven tab/accordion switching** — sidebars where the active item auto-changes as content scrolls past (IntersectionObserver, NOT click handlers)
-- **Smooth scroll libraries** (Lenis, Locomotive Scroll) — check for `.lenis` class or scroll container wrappers
-
-### 6. Identify the Interaction Model Before Building
-
-This is the single most expensive mistake in cloning: building a click-based UI when the original is scroll-driven, or vice versa. Before writing any builder prompt for an interactive section, you must definitively answer: **Is this section driven by clicks, scrolls, hovers, time, or some combination?**
-
-How to determine this:
-1. **Don't click first.** Scroll through the section slowly and observe if things change on their own as you scroll.
-2. If they do, it's scroll-driven. Extract the mechanism: `IntersectionObserver`, `scroll-snap`, `position: sticky`, `animation-timeline`, or JS scroll listeners.
-3. If nothing changes on scroll, THEN click/hover to test for click/hover-driven interactivity.
-4. Document the interaction model explicitly in the component spec: "INTERACTION MODEL: scroll-driven with IntersectionObserver" or "INTERACTION MODEL: click-to-switch with opacity transition."
-
-A section with a sticky sidebar and scrolling content panels is fundamentally different from a tabbed interface where clicking switches content. Getting this wrong means a complete rewrite, not a CSS tweak.
-
-### 7. Extract Every State, Not Just the Default
-
-Many components have multiple visual states — a tab bar shows different cards per tab, a header looks different at scroll position 0 vs 100, a card has hover effects. You must extract ALL states, not just whatever is visible on page load.
-
-For tabbed/stateful content:
-- Click each tab/button via browser MCP
-- Extract the content, images, and card data for EACH state
-- Record which content belongs to which state
-- Note the transition animation between states (opacity, slide, fade, etc.)
-
-For scroll-dependent elements:
-- Capture computed styles at scroll position 0 (initial state)
-- Scroll past the trigger threshold and capture computed styles again (scrolled state)
-- Diff the two to identify exactly which CSS properties change
-- Record the transition CSS (duration, easing, properties)
-- Record the exact trigger threshold (scroll position in px, or viewport intersection ratio)
-
-### 8. Spec Files Are the Source of Truth
-
-Every component gets a specification file under that page's artifact root (`docs/research/<site-key>/<page-key>/components/`) BEFORE any builder is dispatched. This file is the contract between your extraction work and the builder agent. The builder receives the spec file contents inline in its prompt — the file also persists as an auditable artifact that the user (or you) can review if something looks wrong.
-
-The spec file is not optional. It is not a nice-to-have. If you dispatch a builder without first writing a spec file, you are shipping incomplete instructions based on whatever you can remember from a browser MCP session, and the builder will guess to fill gaps.
-
-### 9. Build Must Always Compile
-
-Every builder agent must verify `npx tsc --noEmit` passes before finishing. After merging worktrees, you verify `npm run build` passes. A broken build is never acceptable, even temporarily.
-
-## Phase 1: Reconnaissance
-
-Navigate to the target URL with browser MCP.
-
-### Screenshots
-- Take **full-page screenshots** at desktop (1440px) and mobile (390px) viewports
-- Save to that page's screenshot root (`docs/design-references/<site-key>/<page-key>/`) with descriptive names
-- These are your master reference — builders will receive section-specific crops/screenshots later
-
-### Global Extraction
-Extract these from the page before doing anything else:
-
-**Fonts** — Inspect `<link>` tags for Google Fonts or self-hosted fonts. Check computed `font-family` on key elements (headings, body, code, labels). Document every family, weight, and style actually used. For a single-site app, configure shared fonts in `src/app/layout.tsx` using `next/font/google` or `next/font/local`. In an approved combined multi-site app, keep incompatible fonts/layout concerns route-scoped.
-
-**Colors** — Extract the site's color palette from computed styles across the page. For a single-site app, merge the target's colors into `src/app/globals.css` without removing tokens required by existing routes. Map them to shadcn's token names (background, foreground, primary, muted, etc.) where they fit. In an approved combined multi-site app, use a route wrapper or scoped token namespace instead of replacing another site's global palette.
-
-**Favicons & Meta** — Download page/site SEO assets under the planned site asset namespace. Put truly app-global metadata in the root layout only when it applies to every route; otherwise export route-specific metadata from the destination page or a route layout.
-
-**Global UI patterns** — Identify any site-wide CSS or JS: custom scrollbar hiding, scroll-snap on the page container, global keyframe animations, backdrop filters, gradients used as overlays, **smooth scroll libraries** (Lenis, Locomotive Scroll — check for `.lenis`, `.locomotive-scroll`, or custom scroll container classes). Merge truly shared behavior into `globals.css`; keep page-specific behavior scoped to the page so existing routes do not change unexpectedly.
-
-### Mandatory Interaction Sweep
-
-This is a dedicated pass AFTER screenshots and BEFORE anything else. Its purpose is to discover every behavior on the page — many of which are invisible in a static screenshot.
-
-**Scroll sweep:** Scroll the page slowly from top to bottom via browser MCP. At each section, pause and observe:
-- Does the header change appearance? Record the scroll position where it triggers.
-- Do elements animate into view? Record which ones and the animation type.
-- Does a sidebar or tab indicator auto-switch as you scroll? Record the mechanism.
-- Are there scroll-snap points? Record which containers.
-- Is there a smooth scroll library active? Check for non-native scroll behavior.
-
-**Click sweep:** Click every element that looks interactive:
-- Every button, tab, pill, link, card
-- Record what happens: does content change? Does a modal open? Does a dropdown appear?
-- For tabs/pills: click EACH ONE and record the content that appears for each state
-
-**Hover sweep:** Hover over every element that might have hover states:
-- Buttons, cards, links, images, nav items
-- Record what changes: color, scale, shadow, underline, opacity
-
-**Responsive sweep:** Test at 3 viewport widths via browser MCP:
-- Desktop: 1440px
-- Tablet: 768px
-- Mobile: 390px
-- At each width, note which sections change layout (column → stack, sidebar disappears, etc.) and at approximately which breakpoint the change occurs.
-
-Save all findings to `<artifact-root>/BEHAVIORS.md`. This is your behavior bible — reference it when writing every component spec.
-
-### Page Topology
-Map out every distinct section of the page from top to bottom. Give each a working name. Document:
-- Their visual order
-- Which are fixed/sticky overlays vs. flow content
-- The overall page layout (scroll container, column structure, z-index layers)
-- Dependencies between sections (e.g., a floating nav that overlays everything)
-- **The interaction model** of each section (static, click-driven, scroll-driven, time-driven)
-
-Save this as `<artifact-root>/PAGE_TOPOLOGY.md` — it becomes your assembly blueprint.
-
-## Phase 2: Foundation Build
-
-This is sequential per origin. Do it yourself (not delegated to an agent) since it touches shared files. Re-read the output plan and preserve every existing route before editing:
-
-1. **Merge fonts and shared layout behavior** without deleting requirements of existing routes. Use route layouts when behavior is not truly app-global.
-2. **Merge global CSS carefully**; scope page/site-specific tokens, keyframes, scroll behavior, and utilities under a route wrapper when they could conflict.
-3. **Create namespaced TypeScript interfaces** for the content structures you've observed; reuse existing same-site types only when their contracts match.
-4. **Extract SVG icons** — deduplicate same-site icons under `src/components/sites/<site-key>/shared/icons.tsx`; keep page-only icons in the page component namespace. Name them by visual function (e.g., `SearchIcon`, `ArrowRightIcon`, `LogoIcon`).
-5. **Download assets into the planned namespace** — use the page's uniquely named download script and write into `public/sites/<site-key>/<page-key>/` or the approved same-site shared directory. Never write a generic filename over another page's asset.
-6. Verify every previously existing route still builds, then run `npm run build`.
-
-### Asset Discovery Script Pattern
-
-Use browser MCP to enumerate all assets on the page:
-
-```javascript
-// Run this via browser MCP to discover all assets
-JSON.stringify({
- images: [...document.querySelectorAll('img')].map(img => ({
- src: img.src || img.currentSrc,
- alt: img.alt,
- width: img.naturalWidth,
- height: img.naturalHeight,
- // Include parent info to detect layered compositions
- parentClasses: img.parentElement?.className,
- siblings: img.parentElement ? [...img.parentElement.querySelectorAll('img')].length : 0,
- position: getComputedStyle(img).position,
- zIndex: getComputedStyle(img).zIndex
- })),
- videos: [...document.querySelectorAll('video')].map(v => ({
- src: v.src || v.querySelector('source')?.src,
- poster: v.poster,
- autoplay: v.autoplay,
- loop: v.loop,
- muted: v.muted
- })),
- backgroundImages: [...document.querySelectorAll('*')].filter(el => {
- const bg = getComputedStyle(el).backgroundImage;
- return bg && bg !== 'none';
- }).map(el => ({
- url: getComputedStyle(el).backgroundImage,
- element: el.tagName + '.' + el.className?.split(' ')[0]
- })),
- svgCount: document.querySelectorAll('svg').length,
- fonts: [...new Set([...document.querySelectorAll('*')].slice(0, 200).map(el => getComputedStyle(el).fontFamily))],
- favicons: [...document.querySelectorAll('link[rel*="icon"]')].map(l => ({ href: l.href, sizes: l.sizes?.toString() }))
-});
-```
-
-Then use the uniquely named page download script to fetch everything into its planned asset root. Use batched parallel downloads (4 at a time) with proper error handling.
-
-## Phase 3: Component Specification & Dispatch
-
-This is the core loop. For each section in your page topology (top to bottom), you do THREE things: **extract**, **write the spec file**, then **dispatch builders**.
-
-### Step 1: Extract
-
-For each section, use browser MCP to extract everything:
-
-1. **Screenshot** the section in isolation (scroll to it, screenshot the viewport). Save to the page's screenshot root.
-
-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:
-
-```javascript
-// Per-component extraction — run via browser MCP
-// Replace SELECTOR with the actual CSS selector for the component
-(function(selector) {
- const el = document.querySelector(selector);
- if (!el) return JSON.stringify({ error: 'Element not found: ' + selector });
- const props = [
- 'fontSize','fontWeight','fontFamily','lineHeight','letterSpacing','color',
- 'textTransform','textDecoration','backgroundColor','background',
- 'padding','paddingTop','paddingRight','paddingBottom','paddingLeft',
- 'margin','marginTop','marginRight','marginBottom','marginLeft',
- 'width','height','maxWidth','minWidth','maxHeight','minHeight',
- 'display','flexDirection','justifyContent','alignItems','gap',
- 'gridTemplateColumns','gridTemplateRows',
- 'borderRadius','border','borderTop','borderBottom','borderLeft','borderRight',
- 'boxShadow','overflow','overflowX','overflowY',
- 'position','top','right','bottom','left','zIndex',
- 'opacity','transform','transition','cursor',
- 'objectFit','objectPosition','mixBlendMode','filter','backdropFilter',
- 'whiteSpace','textOverflow','WebkitLineClamp'
- ];
- function extractStyles(element) {
- const cs = getComputedStyle(element);
- const styles = {};
- 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; });
- return styles;
- }
- function walk(element, depth) {
- if (depth > 4) return null;
- const children = [...element.children];
- return {
- tag: element.tagName.toLowerCase(),
- classes: element.className?.toString().split(' ').slice(0, 5).join(' '),
- text: element.childNodes.length === 1 && element.childNodes[0].nodeType === 3 ? element.textContent.trim().slice(0, 200) : null,
- styles: extractStyles(element),
- images: element.tagName === 'IMG' ? { src: element.src, alt: element.alt, naturalWidth: element.naturalWidth, naturalHeight: element.naturalHeight } : null,
- childCount: children.length,
- children: children.slice(0, 20).map(c => walk(c, depth + 1)).filter(Boolean)
- };
- }
- return JSON.stringify(walk(el, 0), null, 2);
-})('SELECTOR');
-```
-
-3. **Extract multi-state styles** — for any element with multiple states (scroll-triggered, hover, active tab), capture BOTH states:
-
-```javascript
-// State A: capture styles at current state (e.g., scroll position 0)
-// Then trigger the state change (scroll, click, hover via browser MCP)
-// State B: re-run the extraction script on the same element
-// The diff between A and B IS the behavior specification
-```
-
-Record the diff explicitly: "Property X changes from VALUE_A to VALUE_B, triggered by TRIGGER, with transition: TRANSITION_CSS."
-
-4. **Extract real content** — all text, alt attributes, aria labels, placeholder text. Use `element.textContent` for each text node. For tabbed/stateful content, **click each tab and extract content per state**.
-
-5. **Identify assets** this section uses — which namespaced downloaded images/videos and which site/page icon components. Check for **layered images** (multiple `<img>` or background-images stacked in the same container).
-
-6. **Assess complexity** — how many distinct sub-components does this section contain? A distinct sub-component is an element with its own unique styling, structure, and behavior (e.g., a card, a nav item, a search panel).
-
-### Step 2: Write the Component Spec File
-
-For each section (or sub-component, if you're breaking it up), create a spec file inside the page's component-spec directory. This is NOT optional — every builder must have a corresponding spec file.
-
-**File path:** `docs/research/<site-key>/<page-key>/components/<component-name>.spec.md`
-
-**Template:**
-
-```markdown
-# <ComponentName> Specification
-
-## Overview
-- **Target file:** `src/components/sites/<site-key>/<page-key>/<ComponentName>.tsx`
-- **Screenshot:** `docs/design-references/<site-key>/<page-key>/<screenshot-name>.png`
-- **Interaction model:** <static | click-driven | scroll-driven | time-driven>
-
-## DOM Structure
-<Describe the element hierarchy — what contains what>
-
-## Computed Styles (exact values from getComputedStyle)
-
-### Container
-- display: ...
-- padding: ...
-- maxWidth: ...
-- (every relevant property with exact values)
-
-### <Child element 1>
-- fontSize: ...
-- color: ...
-- (every relevant property)
-
-### <Child element N>
-...
-
-## States & Behaviors
-
-### <Behavior name, e.g., "Scroll-triggered floating mode">
-- **Trigger:** <exact mechanism — scroll position 50px, IntersectionObserver rootMargin "-30% 0px", click on .tab-button, hover>
-- **State A (before):** maxWidth: 100vw, boxShadow: none, borderRadius: 0
-- **State B (after):** maxWidth: 1200px, boxShadow: 0 4px 20px rgba(0,0,0,0.1), borderRadius: 16px
-- **Transition:** transition: all 0.3s ease
-- **Implementation approach:** <CSS transition + scroll listener | IntersectionObserver | CSS animation-timeline | etc.>
-
-### Hover states
-- **<Element>:** <property>: <before> → <after>, transition: <value>
-
-## Per-State Content (if applicable)
-
-### State: "Featured"
-- Title: "..."
-- Subtitle: "..."
-- Cards: [{ title, description, image, link }, ...]
-
-### State: "Productivity"
-- Title: "..."
-- Cards: [...]
-
-## Assets
-- Background image: `public/sites/<site-key>/<page-key>/images/<file>.webp`
-- Overlay image: `public/sites/<site-key>/<page-key>/images/<file>.png`
-- Icons used: <ArrowIcon>, <SearchIcon> from the planned page or same-site shared icon module
-
-## Text Content (verbatim)
-<All text content, copy-pasted from the live site>
-
-## Responsive Behavior
-- **Desktop (1440px):** <layout description>
-- **Tablet (768px):** <what changes — e.g., "maintains 2-column, gap reduces to 16px">
-- **Mobile (390px):** <what changes — e.g., "stacks to single column, images full-width">
-- **Breakpoint:** layout switches at ~<N>px
-```
-
-Fill every section. If a section doesn't apply (e.g., no states for a static footer), write "N/A" — but think twice before marking States & Behaviors as N/A. Even a footer might have hover states on links.
-
-### Step 3: Dispatch Builders
-
-Based on complexity, dispatch builder agent(s) in worktree(s):
-
-**Simple section** (1-2 sub-components): One builder agent gets the entire section.
-
-**Complex section** (3+ distinct sub-components): Break it up. One agent per sub-component, plus one agent for the section wrapper that imports them. Sub-component builders go first since the wrapper depends on them.
-
-**What every builder agent receives:**
-- The full contents of its component spec file (inline in the prompt — don't say "go read the spec file")
-- Path to the section screenshot in the page's namespaced screenshot root
-- Which shared components to import (the planned site-scoped icon module, `cn()`, shadcn primitives)
-- The namespaced target file path (e.g., `src/components/sites/<site-key>/<page-key>/HeroSection.tsx`)
-- Instruction to verify with `npx tsc --noEmit` before finishing
-- For responsive behavior: the specific breakpoint values and what changes
-
-**Don't wait.** As soon as you've dispatched the builder(s) for one section, move to extracting the next section. Builders work in parallel in their worktrees while you continue extraction.
-
-### Step 4: Merge
-
-As builder agents complete their work:
-- Merge their worktree branches into main
-- You have full context on what each agent built, so resolve any conflicts intelligently
-- Reject or repair any merge that deletes or rewrites an unrelated existing route or another page's namespace
-- After each merge, verify the build still passes: `npm run build`
-- If a merge introduces type errors, fix them immediately
-
-The extract → spec → dispatch → merge cycle continues until all sections are built.
-
-## Phase 4: Page Assembly
-
-After all sections are built and merged, wire the page into the exact destination route from the approved output plan. Use `src/app/page.tsx` only for the first fresh-template root clone; otherwise use the planned path such as `src/app/docs/intro/page.tsx`:
-
-- Import all section components
-- Implement the page-level layout from your topology doc (scroll containers, column structures, sticky positioning, z-index layering)
-- Connect real content to component props
-- Implement page-level behaviors: scroll snap, scroll-driven animations, dark-to-light transitions, intersection observers, smooth scroll (Lenis etc.)
-- Confirm all routes that existed before this run are still present and were not unintentionally changed
-- Verify: `npm run build` passes clean
-
-## Phase 5: Visual QA Diff
-
-After assembly, do NOT declare the clone complete. Take side-by-side comparison screenshots:
-
-1. Open the original site and the clone at its planned local route side-by-side (or take screenshots at the same viewport widths)
-2. Compare section by section, top to bottom, at desktop (1440px)
-3. Compare again at mobile (390px)
-4. For each discrepancy found:
- - Check the component spec file — was the value extracted correctly?
- - If the spec was wrong: re-extract from browser MCP, update the spec, fix the component
- - If the spec was right but the builder got it wrong: fix the component to match the spec
-5. Test all interactive behaviors: scroll through the page, click every button/tab, hover over interactive elements
-6. Verify smooth scroll feels right, header transitions work, tab switching works, animations play
-
-Only after this visual QA pass is the clone complete.
-
-## Pre-Dispatch Checklist
-
-Before dispatching ANY builder agent, verify you can check every box. If you can't, go back and extract more.
-
-- [ ] Spec file written to `docs/research/<site-key>/<page-key>/components/<name>.spec.md` with ALL sections filled
-- [ ] Every CSS value in the spec is from `getComputedStyle()`, not estimated
-- [ ] Interaction model is identified and documented (static / click / scroll / time)
-- [ ] For stateful components: every state's content and styles are captured
-- [ ] For scroll-driven components: trigger threshold, before/after styles, and transition are recorded
-- [ ] For hover states: before/after values and transition timing are recorded
-- [ ] All images in the section are identified (including overlays and layered compositions)
-- [ ] Responsive behavior is documented for at least desktop and mobile
-- [ ] Text content is verbatim from the site, not paraphrased
-- [ ] The builder prompt is under ~150 lines of spec; if over, the section needs to be split
-
-## What NOT to Do
-
-These are lessons from previous failed clones — each one cost hours of rework:
-
-- **Don't build click-based tabs when the original is scroll-driven (or vice versa).** Determine the interaction model FIRST by scrolling before clicking. This is the #1 most expensive mistake — it requires a complete rewrite, not a CSS fix.
-- **Don't extract only the default state.** If there are tabs showing "Featured" on load, click Productivity, Creative, Lifestyle and extract each one's cards/content. If the header changes on scroll, capture styles at position 0 AND position 100+.
-- **Don't miss overlay/layered images.** A background watercolor + foreground UI mockup = 2 images. Check every container's DOM tree for multiple `<img>` elements and positioned overlays.
-- **Don't build mockup components for content that's actually videos/animations.** Check if a section uses `<video>`, Lottie, or canvas before building elaborate HTML mockups of what the video shows.
-- **Don't approximate CSS classes.** "It looks like `text-lg`" is wrong if the computed value is `18px` and `text-lg` is `18px/28px` but the actual line-height is `24px`. Extract exact values.
-- **Don't build everything in one monolithic commit.** The whole point of this pipeline is incremental progress with verified builds at each step.
-- **Don't treat a new target as permission to replace the current app.** Preserve existing routes and namespaced artifacts; ask before updating a route that already exists.
-- **Don't reference docs from builder prompts.** Each builder gets the CSS spec inline in its prompt — never "see DESIGN_TOKENS.md for colors." The builder should have zero need to read external docs.
-- **Don't skip asset extraction.** Without real images, videos, and fonts, the clone will always look fake regardless of how perfect the CSS is.
-- **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.
-- **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.
-- **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.
-- **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.
-- **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.
-
-## Completion
-
-When done, report:
-- Source URL to destination-route mapping for every page built
-- Existing routes preserved and any explicitly approved replacements
-- Total sections built
-- Total components created
-- Total spec files written (should match components)
-- Total assets downloaded (images, videos, SVGs, fonts)
-- Build status (`npm run build` result)
-- Visual QA results (any remaining discrepancies)
-- Any known gaps or limitations
diff --git a/.windsurfrules b/.windsurfrules
deleted file mode 100644
index dcc3e110..00000000
--- a/.windsurfrules
+++ /dev/null
@@ -1,2 +0,0 @@
-This project uses AGENTS.md as the single source of truth for all AI agent instructions.
-Windsurf reads AGENTS.md automatically — see the project root for complete guidelines.
diff --git a/AGENTS.md b/AGENTS.md
index d6120607..f9309145 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -59,11 +59,14 @@ docs/
research/ # Inspection output (design tokens, components, layout)
design-references/ # Screenshots and visual references
scripts/ # Asset download scripts
+.agents/
+ skills/
+ clone-website/ # Canonical cross-agent cloning workflow
+.claude/
+ commands/
+ clone-website.md # Thin Claude Code invocation bridge
```
-## MOST IMPORTANT NOTES
-- When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
-- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
-- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
-
-@docs/research/INSPECTION_GUIDE.md
+## Agent Workflow
+- Edit `.agents/skills/clone-website/` for cloning-workflow changes. It is the canonical skill used by Codex, Cursor, and OpenCode.
+- Keep `.claude/commands/clone-website.md` as a thin Claude Code bridge to the canonical skill; do not duplicate the workflow there.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 95b3aeb3..d623e1aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Changed
+- Consolidated Claude Code, Codex, Cursor, and OpenCode support around one canonical Agent Skill in `.agents/skills/clone-website/`
+- Reduced the Claude Code integration to a thin command bridge that forwards arguments to the canonical skill without creating a duplicate skill in other agents
+- Moved the website inspection guide into the canonical skill's on-demand references
+
+### Removed
+- Generated skill and instruction copies for unsupported or redundant agent platforms
+- The agent-rule and skill synchronization scripts and their generated-file CI gate
+
## [0.4.0] - 2026-08-10
### Added
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 91513bc8..161b20e8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,14 +2,14 @@
Thanks for your interest in improving the **AI Website Cloner Template**! This guide covers how to contribute to the template itself.
-> **Note:** This repository is a *template*. If you just want to clone a website, don't open a PR here — click **Use this template** to make your own copy and work there (see the [README](README.md#quick-start)). Pull requests should improve the template: the `/clone-website` skill, agent platform support, the scaffold, or the docs.
+> **Note:** This repository is a *template*. If you just want to clone a website, don't open a PR here — click **Use this template** to make your own copy and work there (see the [README](README.md#quick-start)). Pull requests should improve the template: the `/clone-website` skill, support for the four documented agents, the scaffold, or the docs.
## Ways to contribute
- **Improve the `/clone-website` skill** — sharper extraction, better prompts, new behaviors to detect
-- **Add or fix agent platform support** — new coding agents, or fixes to existing generated configs
-- **Fix bugs** in the Next.js scaffold or the sync scripts
-- **Improve documentation** — the README, `AGENTS.md`, or the inspection guides under `docs/research/`
+- **Improve agent support** — fixes for Claude Code, Codex, Cursor, or OpenCode
+- **Fix bugs** in the Next.js scaffold
+- **Improve documentation** — the README, `AGENTS.md`, or the skill references
Browse the [open issues](https://github.com/JCodesMore/ai-website-cloner-template/issues) for something to pick up. For substantial or potentially breaking changes, consider opening an issue first so we can align on the approach before significant work begins.
@@ -29,21 +29,16 @@ Before opening a PR, make sure the project is green:
npm run check # lint + typecheck + build
```
-## Source-of-truth files & the sync scripts
+## Source-of-truth files
-This is the most important thing to know. Two source files generate the platform-specific project instructions and `/clone-website` skill copies. Edit the source files rather than their generated copies.
+Project instructions live in `AGENTS.md`. The canonical cloning workflow lives in `.agents/skills/clone-website/` and is read directly by Codex, Cursor, and OpenCode. Claude Code enters through `.claude/commands/clone-website.md`, which must remain a thin bridge rather than a second workflow copy.
-| What | Edit this (source of truth) | Then run |
-| ---------------------- | --------------------------------------- | ---------------------------------- |
-| Project instructions | `AGENTS.md` | `bash scripts/sync-agent-rules.sh` |
-| `/clone-website` skill | `.claude/skills/clone-website/SKILL.md` | `node scripts/sync-skills.mjs` |
-
-After editing a source file, run the matching sync command and commit the regenerated files along with your change. CI verifies that the generated files are in sync — if you forget to regenerate, CI will fail with a reminder.
+Edit the canonical skill and its references directly. There is no generation or synchronization step.
## Submitting a pull request
1. **Fork** the repo and create a branch off `master` (e.g. `fix/skill-hover-extraction` or `docs/clarify-setup`).
-2. Make your change. If you touched a source-of-truth file, **run the relevant sync script** (see above).
+2. Make your focused change in the appropriate source-of-truth file.
3. Run `npm run check` and make sure it passes.
4. Write a clear commit message that describes the change. Prefixes such as `fix:`, `feat:`, or `docs:` are welcome but not required.
5. Open a PR against `master`, fill out the PR template, and link a relevant issue when one exists (for example, `Closes #123`).
diff --git a/GEMINI.md b/GEMINI.md
deleted file mode 100644
index 43c994c2..00000000
--- a/GEMINI.md
+++ /dev/null
@@ -1 +0,0 @@
diff --git a/README.ja.md b/README.ja.md
index eb05bbb0..38b0ca59 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -6,7 +6,7 @@
AI コーディングエージェントに URL を渡すだけで、ウェブサイトをクリーンな Next.js アプリとして再現できます。
-**最良の結果を得るには [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Opus 5 を推奨します。Codex、Cursor、Gemini などにも対応しています。**
+**最良の結果を得るには [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Opus 5 を推奨します。Codex、Cursor、OpenCode にも対応しています。**
[![Use this template](https://img.shields.io/badge/Use_this_template-Create_your_copy-2ea44f?style=for-the-badge&logo=github&logoColor=white)](https://github.com/JCodesMore/ai-website-cloner-template/generate) [![Discord](https://img.shields.io/badge/Join_the_community-Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/hrTSX5yTpB)
@@ -57,13 +57,15 @@ AI コーディングエージェントに URL を渡すだけで、ウェブサ
```bash
claude --chrome
```
-5. **スキルを実行する**:
- ```
- /clone-website <target-url1> [<target-url2> ...]
- ```
+5. **各エージェントの方法でスキルを実行する**:
+
+ - Claude Code または Cursor:`/clone-website <target-url1> [<target-url2> ...]`
+ - Codex:`$clone-website <target-url1> [<target-url2> ...]`
+ - OpenCode:`clone-website スキルを使って <対象URL> をクローンして`
+
6. **カスタマイズする**(任意)— 基本のクローンが構築された後、必要に応じて変更します
-> ほとんどの対応クライアントでは `/clone-website` を直接実行できます。自然言語による依頼でスキルを起動するクライアントでは、`clone-website ワークフローを使って <対象URL> をクローンして` と入力してください。プロジェクトの指示は `AGENTS.md` にあります。
+> ワークフローはテンプレートに含まれています。スキルの追加インストールや同期コマンドは不要です。プロジェクトの指示は `AGENTS.md` にあります。
## 対応プラットフォーム
@@ -72,16 +74,7 @@ AI コーディングエージェントに URL を渡すだけで、ウェブサ
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | **推奨** — Opus 5 |
| [Codex CLI](https://github.com/openai/codex) | 対応 |
| [OpenCode](https://opencode.ai/) | 対応 |
-| [GitHub Copilot](https://github.com/features/copilot) | 対応 |
-| [Kiro](https://kiro.dev/) | 対応 |
| [Cursor](https://cursor.com/) | 対応 |
-| [Windsurf](https://codeium.com/windsurf) | 対応 |
-| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | 対応 |
-| [Cline](https://github.com/cline/cline) | 対応 |
-| [Roo Code](https://github.com/RooCodeInc/Roo-Code) | 対応 |
-| [Continue](https://continue.dev/) | 対応 |
-| [Amazon Q](https://aws.amazon.com/q/developer/) | 対応 |
-| [Augment Code](https://www.augmentcode.com/) | 対応 |
## 前提条件
@@ -145,16 +138,12 @@ public/
docs/
research/ # 調査結果とコンポーネント仕様
design-references/ # スクリーンショット
-scripts/
- sync-agent-rules.sh # エージェント指示ファイルを再生成
- sync-skills.mjs # 全プラットフォーム向けに /clone-website を再生成
-.kiro/skills/ # 生成された Kiro ワークスペーススキル
-.cline/skills/ # 生成された Cline ワークスペーススキル
-.roo/skills/ # 生成された Roo Code ワークスペーススキル
-.roo/commands/ # 生成された Roo Code スラッシュコマンド
+.agents/skills/
+ clone-website/ # 正本スキルと検査リファレンス
+.claude/commands/
+ clone-website.md # Claude Code 用の薄いブリッジ
AGENTS.md # エージェント指示(唯一の参照元)
CLAUDE.md # Claude Code 設定(AGENTS.md を読み込み)
-GEMINI.md # Gemini CLI 設定(AGENTS.md を読み込み)
```
## コマンド
@@ -174,16 +163,11 @@ docker compose up app --build # アプリをビルドして起動
docker compose up dev --build # ポート 3001 で開発モードを起動
```
-## 他のプラットフォーム向けの更新
-
-すべてのプラットフォーム対応は、次の2つの正本ファイルを基盤としています。ソースを編集してから、同期スクリプトを実行してください。
+## エージェント対応
-| 対象 | 唯一の参照元 | 同期コマンド |
-| ----------------------- | ---------------------------------------- | ---------------------------------- |
-| プロジェクトの手順 | `AGENTS.md` | `bash scripts/sync-agent-rules.sh` |
-| `/clone-website` スキル | `.claude/skills/clone-website/SKILL.md` | `node scripts/sync-skills.mjs` |
+プロジェクトは `.agents/skills/clone-website/` に1つのポータブルな Agent Skill を保持します。Codex、Cursor、OpenCode はこれを直接読み取ります。Claude Code は `.claude/commands/clone-website.md` の小さなコマンドブリッジを使用するため、他のエージェントに重複したスキルを公開せずに `/clone-website` と引数を利用できます。
-各スクリプトは、プラットフォーム固有のコピーを自動的に再生成します。ソースファイルを直接読み取るエージェントでは、再生成は不要です。
+変更は正本スキルに直接加えてください。プラットフォーム別の生成コピーや同期スクリプトはありません。
## Star History
diff --git a/README.md b/README.md
index 2c2b3de4..09bbae6c 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
Give your AI coding agent a URL and watch it recreate the website as a clean Next.js app.
-**Best results with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Opus 5. Works with Codex, Cursor, Gemini, and more.**
+**Best results with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Opus 5. Also supports Codex, Cursor, and OpenCode.**
[![Use this template](https://img.shields.io/badge/Use_this_template-Create_your_copy-2ea44f?style=for-the-badge&logo=github&logoColor=white)](https://github.com/JCodesMore/ai-website-cloner-template/generate) [![Discord](https://img.shields.io/badge/Join_the_community-Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/hrTSX5yTpB)
@@ -57,13 +57,15 @@ Give your AI coding agent a URL and watch it recreate the website as a clean Nex
```bash
claude --chrome
```
-5. **Run the skill**:
- ```
- /clone-website <target-url1> [<target-url2> ...]
- ```
+5. **Run the skill** using your agent's native invocation:
+
+ - Claude Code or Cursor: `/clone-website <target-url1> [<target-url2> ...]`
+ - Codex: `$clone-website <target-url1> [<target-url2> ...]`
+ - OpenCode: `Clone <target-url> using the clone-website skill`
+
6. **Customize** (optional) — after the base clone is built, modify as needed
-> Most supported clients expose `/clone-website` directly. If your client activates skills from natural-language requests, enter `Clone <target-url> using the clone-website workflow`. Project instructions are in `AGENTS.md`.
+> The workflow ships with the template. No separate skill installation or synchronization command is required. Project instructions are in `AGENTS.md`.
## Supported Platforms
@@ -72,16 +74,7 @@ Give your AI coding agent a URL and watch it recreate the website as a clean Nex
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | **Recommended** — Opus 5 |
| [Codex CLI](https://github.com/openai/codex) | Supported |
| [OpenCode](https://opencode.ai/) | Supported |
-| [GitHub Copilot](https://github.com/features/copilot) | Supported |
-| [Kiro](https://kiro.dev/) | Supported |
| [Cursor](https://cursor.com/) | Supported |
-| [Windsurf](https://codeium.com/windsurf) | Supported |
-| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Supported |
-| [Cline](https://github.com/cline/cline) | Supported |
-| [Roo Code](https://github.com/RooCodeInc/Roo-Code) | Supported |
-| [Continue](https://continue.dev/) | Supported |
-| [Amazon Q](https://aws.amazon.com/q/developer/) | Supported |
-| [Augment Code](https://www.augmentcode.com/) | Supported |
## Prerequisites
@@ -145,16 +138,12 @@ public/
docs/
research/ # Extraction output & component specs
design-references/ # Screenshots
-scripts/
- sync-agent-rules.sh # Regenerate agent instruction files
- sync-skills.mjs # Regenerate /clone-website for all platforms
-.kiro/skills/ # Generated Kiro workspace skill
-.cline/skills/ # Generated Cline workspace skill
-.roo/skills/ # Generated Roo Code workspace skill
-.roo/commands/ # Generated Roo Code slash command
+.agents/skills/
+ clone-website/ # Canonical skill and inspection reference
+.claude/commands/
+ clone-website.md # Thin Claude Code bridge
AGENTS.md # Agent instructions (single source of truth)
CLAUDE.md # Claude Code config (imports AGENTS.md)
-GEMINI.md # Gemini CLI config (imports AGENTS.md)
```
## Commands
@@ -174,16 +163,11 @@ docker compose up app --build # build and run the app
docker compose up dev --build # run the app in dev mode on port 3001
```
-## Updating for Other Platforms
-
-Two source-of-truth files power all platform support. Edit the source, then run the sync script:
+## Agent Support
-| What | Source of truth | Sync command |
-| ---------------------- | --------------------------------------- | ---------------------------------- |
-| Project instructions | `AGENTS.md` | `bash scripts/sync-agent-rules.sh` |
-| `/clone-website` skill | `.claude/skills/clone-website/SKILL.md` | `node scripts/sync-skills.mjs` |
+The project keeps one portable Agent Skill at `.agents/skills/clone-website/`. Codex, Cursor, and OpenCode read it directly. Claude Code uses the small command bridge at `.claude/commands/clone-website.md` so `/clone-website` and its arguments continue to work without exposing a duplicate skill to the other agents.
-Each script regenerates the platform-specific copies automatically. Agents that read the source files natively need no regeneration.
+Edit the canonical skill directly. There are no generated platform copies or synchronization scripts.
## Star History
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 297907e5..71185356 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -6,7 +6,7 @@
只需给你的 AI 编程代理一个 URL,它就会将该网站重新构建成一个简洁的 Next.js 应用。
-**推荐使用 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Opus 5 以获得最佳效果,同时支持 Codex、Cursor、Gemini 等工具。**
+**推荐使用 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Opus 5 以获得最佳效果,同时支持 Codex、Cursor 和 OpenCode。**
[![Use this template](https://img.shields.io/badge/Use_this_template-Create_your_copy-2ea44f?style=for-the-badge&logo=github&logoColor=white)](https://github.com/JCodesMore/ai-website-cloner-template/generate) [![Discord](https://img.shields.io/badge/Join_the_community-Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/hrTSX5yTpB)
@@ -57,13 +57,15 @@
```bash
claude --chrome
```
-5. **运行克隆指令**:
- ```
- /clone-website <目标网址1> [<目标网址2> ...]
- ```
+5. **使用对应代理的原生方式运行技能**:
+
+ - Claude Code 或 Cursor:`/clone-website <目标网址1> [<目标网址2> ...]`
+ - Codex:`$clone-website <目标网址1> [<目标网址2> ...]`
+ - OpenCode:`使用 clone-website 技能克隆 <目标网址>`
+
6. **按需定制**(可选) — 基础克隆完成后,可进一步修改。
-> 大多数受支持的客户端都可以直接调用 `/clone-website`。如果你的客户端通过自然语言请求激活技能,请输入 `使用 clone-website 工作流克隆 <目标网址>`。项目指令位于 `AGENTS.md`。
+> 工作流已随模板提供,无需单独安装技能或运行同步命令。项目指令位于 `AGENTS.md`。
## 支持的平台
@@ -72,16 +74,7 @@
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | **推荐** — Opus 5 |
| [Codex CLI](https://github.com/openai/codex) | 已支持 |
| [OpenCode](https://opencode.ai/) | 已支持 |
-| [GitHub Copilot](https://github.com/features/copilot) | 已支持 |
-| [Kiro](https://kiro.dev/) | 已支持 |
| [Cursor](https://cursor.com/) | 已支持 |
-| [Windsurf](https://codeium.com/windsurf) | 已支持 |
-| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | 已支持 |
-| [Cline](https://github.com/cline/cline) | 已支持 |
-| [Roo Code](https://github.com/RooCodeInc/Roo-Code) | 已支持 |
-| [Continue](https://continue.dev/) | 已支持 |
-| [Amazon Q](https://aws.amazon.com/q/developer/) | 已支持 |
-| [Augment Code](https://www.augmentcode.com/) | 已支持 |
## 前置要求
@@ -145,16 +138,12 @@ public/
docs/
research/ # 提取产物与组件规格
design-references/ # 截图参考
-scripts/
- sync-agent-rules.sh # 重新生成各代理指令文件
- sync-skills.mjs # 为所有平台重新生成 /clone-website 指令
-.kiro/skills/ # 生成的 Kiro 工作区技能
-.cline/skills/ # 生成的 Cline 工作区技能
-.roo/skills/ # 生成的 Roo Code 工作区技能
-.roo/commands/ # 生成的 Roo Code 斜杠命令
+.agents/skills/
+ clone-website/ # 规范技能与检查参考
+.claude/commands/
+ clone-website.md # Claude Code 的轻量桥接文件
AGENTS.md # 代理指令(单一事实来源)
CLAUDE.md # Claude Code 配置(引用 AGENTS.md)
-GEMINI.md # Gemini CLI 配置(引用 AGENTS.md)
```
## 常用命令
@@ -174,16 +163,11 @@ docker compose up app --build # 构建并运行应用
docker compose up dev --build # 在开发模式下运行,端口 3001
```
-## 为其他平台更新指令
-
-有两个单一事实来源文件驱动所有平台支持。编辑源文件后运行同步脚本即可:
+## 代理支持
-| 内容 | 事实来源 | 同步命令 |
-| ---------------------- | ---------------------------------------- | -------------------------------------- |
-| 项目指令 | `AGENTS.md` | `bash scripts/sync-agent-rules.sh` |
-| `/clone-website` 指令 | `.claude/skills/clone-website/SKILL.md` | `node scripts/sync-skills.mjs` |
+项目在 `.agents/skills/clone-website/` 中维护一份可移植的 Agent Skill。Codex、Cursor 和 OpenCode 会直接读取它。Claude Code 通过 `.claude/commands/clone-website.md` 中的轻量命令桥接文件运行,因此无需向其他代理暴露重复技能也能保留 `/clone-website` 及其参数。
-每个脚本会自动重新生成各平台对应的副本。能够直接读取源文件的代理无需重新生成。
+请直接编辑规范技能。本项目不再包含各平台的生成副本或同步脚本。
## Star 历史
diff --git a/scripts/sync-agent-rules.sh b/scripts/sync-agent-rules.sh
deleted file mode 100644
index 661affc8..00000000
--- a/scripts/sync-agent-rules.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env bash
-#
-# sync-agent-rules.sh — Generate AI agent config files from AGENTS.md
-#
-# AGENTS.md is the single source of truth. This script creates copies
-# for agents that don't read AGENTS.md natively (Cline, Continue,
-# Amazon Q, GitHub Copilot Chat).
-#
-# Usage:
-# bash scripts/sync-agent-rules.sh
-#
-# Agents that DON'T need generated files (they read AGENTS.md natively):
-# Codex CLI, OpenCode, Cursor, Windsurf, Copilot Coding Agent,
-# Roo Code, Aider, Augment Code, Kiro
-#
-# Agents with their own thin pointer files (created manually):
-# Claude Code → CLAUDE.md (@AGENTS.md import)
-# Gemini CLI → GEMINI.md (@AGENTS.md import)
-# Cursor → .cursor/rules/project.mdc (pointer)
-# Windsurf → .windsurfrules (pointer)
-# Aider → .aider.conf.yml (read: [AGENTS.md])
-
-set -euo pipefail
-
-REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
-SOURCE="$REPO_ROOT/AGENTS.md"
-
-if [[ ! -f "$SOURCE" ]]; then
- echo "Error: AGENTS.md not found at $SOURCE" >&2
- exit 1
-fi
-
-# Resolve @file imports (Claude Code syntax) into inline content.
-# Lines like "@docs/research/INSPECTION_GUIDE.md" become the file's contents.
-resolve_imports() {
- while IFS= read -r line || [[ -n "$line" ]]; do
- line="${line%$'\r'}"
- if [[ "$line" =~ ^@(.+)$ ]]; then
- local import_path="${BASH_REMATCH[1]}"
- local resolved="$REPO_ROOT/$import_path"
- if [[ -f "$resolved" ]]; then
- cat "$resolved"
- echo ""
- else
- echo "<!-- Import not found: $import_path -->"
- fi
- else
- echo "$line"
- fi
- done < "$SOURCE"
-}
-
-RESOLVED_CONTENT="$(resolve_imports)"
-
-HEADER="<!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
- Run \`bash scripts/sync-agent-rules.sh\` to regenerate. -->"
-
-# Helper: write a generated file with header
-write_file() {
- local target="$1"
- local content="$2"
- mkdir -p "$(dirname "$target")"
- printf '%s\n\n%s\n' "$HEADER" "$content" > "$target"
- echo " ✓ $target"
-}
-
-echo "Syncing agent rules from AGENTS.md..."
-
-# GitHub Copilot Chat — .github/copilot-instructions.md
-write_file "$REPO_ROOT/.github/copilot-instructions.md" "$RESOLVED_CONTENT"
-
-# Cline / Roo Code — .clinerules
-write_file "$REPO_ROOT/.clinerules" "$RESOLVED_CONTENT"
-
-# Continue — .continue/rules/project.md
-CONTINUE_FRONTMATTER="---
-description: Project conventions for AI Website Clone Template
-alwaysApply: true
----"
-write_file "$REPO_ROOT/.continue/rules/project.md" "$CONTINUE_FRONTMATTER
-$RESOLVED_CONTENT"
-
-# Amazon Q Developer — .amazonq/rules/project.md
-write_file "$REPO_ROOT/.amazonq/rules/project.md" "$RESOLVED_CONTENT"
-
-echo ""
-echo "Done. Generated files are committed to the repo but sourced from AGENTS.md."
-echo "Edit AGENTS.md, then re-run this script to update all agent configs."
diff --git a/scripts/sync-skills.mjs b/scripts/sync-skills.mjs
deleted file mode 100644
index c6156b39..00000000
--- a/scripts/sync-skills.mjs
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Generates clone-website command/skill files for all supported AI coding platforms.
- * Source of truth: .claude/skills/clone-website/SKILL.md
- *
- * Usage: node scripts/sync-skills.mjs
- */
-
-import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
-import { dirname, join } from 'node:path';
-import { fileURLToPath } from 'node:url';
-
-const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
-const SOURCE = join(ROOT, '.claude', 'skills', 'clone-website', 'SKILL.md');
-
-// --- Parse source skill ---
-
-let raw;
-try {
- raw = readFileSync(SOURCE, 'utf8').replace(/\r\n/g, '\n');
-} catch {
- console.error(`Error: Source skill not found at .claude/skills/clone-website/SKILL.md`);
- process.exit(1);
-}
-
-const match = raw.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
-if (!match) {
- console.error('Error: Could not parse SKILL.md frontmatter');
- process.exit(1);
-}
-
-const body = match[2];
-const shortDesc = 'Reverse-engineer and clone one or more websites as pixel-perfect replicas';
-
-// --- Helpers ---
-
-function write(relPath, content) {
- const full = join(ROOT, relPath);
- mkdirSync(dirname(full), { recursive: true });
- writeFileSync(full, content, 'utf8');
- console.log(` \u2713 ${relPath}`);
-}
-
-const HEADER =
- '<!-- AUTO-GENERATED from .claude/skills/clone-website/SKILL.md \u2014 do not edit directly.\n' +
- ' Run `node scripts/sync-skills.mjs` to regenerate. -->\n\n';
-
-const noArgs = (text) => text.replace(/\$ARGUMENTS/g, 'the target URL or URLs provided by the user');
-
-const agentSkill = (text) =>
- `---\nname: clone-website\ndescription: "${shortDesc}"\n---\n${noArgs(text)}`;
-
-// --- Generate ---
-
-console.log('Syncing clone-website skill to all platforms...');
-console.log(` Source: .claude/skills/clone-website/SKILL.md\n`);
-
-// 1. Codex CLI — same SKILL.md format, same $ARGUMENTS syntax
-write('.codex/skills/clone-website/SKILL.md', raw);
-
-// 2. GitHub Copilot — same SKILL.md format
-write('.github/skills/clone-website/SKILL.md', raw);
-
-// 3. Kiro — same SKILL.md format and $ARGUMENTS syntax
-write('.kiro/skills/clone-website/SKILL.md', raw);
-
-// 4. Cline — Agent Skills format without Claude-only frontmatter/placeholders
-write('.cline/skills/clone-website/SKILL.md', agentSkill(body));
-
-// 5. Roo Code — standards-compliant Agent Skill plus a slash-command entry point
-write('.roo/skills/clone-website/SKILL.md', agentSkill(body));
-write(
- '.roo/commands/clone-website.md',
- `---\ndescription: "${shortDesc}"\nargument-hint: "<url1> [<url2> ...]"\n---\n` +
- HEADER +
- 'Use the `clone-website` skill for the target URL or URLs provided by the user. ' +
- 'Load that skill and follow its workflow exactly.\n'
-);
-
-// 6. Cursor — plain markdown, no argument substitution support
-write('.cursor/commands/clone-website.md', HEADER + noArgs(body));
-
-// 7. Windsurf — markdown workflow
-write('.windsurf/workflows/clone-website.md', HEADER + noArgs(body));
-
-// 8. Gemini CLI — TOML format, {{args}} for arguments
-const geminiBody = body.replace(/\$ARGUMENTS/g, '{{args}}');
-write(
- '.gemini/commands/clone-website.toml',
- `# AUTO-GENERATED from .claude/skills/clone-website/SKILL.md\n` +
- `# Run \`node scripts/sync-skills.mjs\` to regenerate.\n\n` +
- `description = "${shortDesc}"\n` +
- `name = "clone-website"\n\n` +
- `prompt = '''\n${geminiBody}\n'''\n`
-);
-
-// 9. OpenCode — markdown + YAML frontmatter, $ARGUMENTS works natively
-write(
- '.opencode/commands/clone-website.md',
- `---\ndescription: "${shortDesc}"\n---\n${HEADER}${body}`
-);
-
-// 10. Augment Code — markdown + YAML frontmatter
-write(
- '.augment/commands/clone-website.md',
- `---\ndescription: "${shortDesc}"\nargument-hint: "<url1> [<url2> ...]"\n---\n${HEADER}${body}`
-);
-
-// 11. Continue — prompt file with invokable: true
-write(
- '.continue/commands/clone-website.md',
- `---\nname: clone-website\ndescription: "${shortDesc}"\ninvokable: true\n---\n${HEADER}${body}`
-);
-
-// 12. Amazon Q — JSON agent definition
-write(
- '.amazonq/cli-agents/clone-website.json',
- JSON.stringify(
- {
- name: 'clone-website',
- description: shortDesc,
- prompt: noArgs(body),
- fileContext: ['AGENTS.md', 'docs/research/**'],
- },
- null,
- 2
- ) + '\n'
-);
-
-console.log('\nDone! 13 platform command/skill files generated from source skill.');