launchframe 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.claude/skills/clone-website/SKILL.md +473 -564
  2. package/.clinerules +147 -285
  3. package/.codex/skills/clone-website/SKILL.md +473 -564
  4. package/.continue/commands/clone-website.md +475 -566
  5. package/.continue/rules/project.md +151 -285
  6. package/.cursor/commands/clone-website.md +470 -561
  7. package/.cursor/rules/project.mdc +7 -22
  8. package/.gemini/commands/clone-website.toml +476 -567
  9. package/.github/copilot-instructions.md +147 -281
  10. package/.github/skills/clone-website/SKILL.md +473 -564
  11. package/.gitignore +49 -0
  12. package/.opencode/commands/clone-website.md +473 -564
  13. package/.windsurf/workflows/clone-website.md +470 -561
  14. package/AGENTS.md +65 -160
  15. package/README.md +162 -121
  16. package/bin/launchframe.mjs +343 -0
  17. package/docs/research/INSPECTION_GUIDE.md +80 -124
  18. package/package.json +97 -54
  19. package/src/app/globals.css +1 -93
  20. package/src/app/layout.tsx +16 -5
  21. package/src/app/page.tsx +37 -2
  22. package/src/lib/launchframe-config.ts +8 -0
  23. package/.amazonq/cli-agents/clone-website.json +0 -9
  24. package/.amazonq/rules/project.md +0 -281
  25. package/.augment/commands/clone-website.md +0 -565
  26. package/.claude/skills/marketing-social-proof-motion/SKILL.md +0 -47
  27. package/.cursor/commands/marketing-social-proof-motion.md +0 -42
  28. package/.nvmrc +0 -1
  29. package/CHANGELOG.md +0 -80
  30. package/START_HERE.md +0 -15
  31. package/docs/design-references/playwright-example.com-1440px.png +0 -0
  32. package/docs/design-references/playwright-example.com-390px.png +0 -0
  33. package/launchframe.config.json +0 -14
  34. package/public/images/.gitkeep +0 -0
  35. package/public/seo/.gitkeep +0 -0
  36. package/public/videos/.gitkeep +0 -0
  37. package/scripts/recon-playwright.mjs +0 -396
  38. package/src/components/marketing/scribewise-landing.tsx +0 -34
@@ -1,281 +1,147 @@
1
- <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
-
4
- <!-- BEGIN:nextjs-agent-rules -->
5
- # This is NOT the Next.js you know
6
-
7
- 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/` before writing any code. Heed deprecation notices.
8
- <!-- END:nextjs-agent-rules -->
9
-
10
- # Launchframe Project (AI Website Cloner + SaaS Rebrand)
11
-
12
- ## What This Is
13
- This project was scaffolded by [Launchframe](https://github.com/evangruhlkey/launchframe) via `npx launchframe@latest <url> "<saas idea>"`. It is a Next.js + shadcn/ui + Tailwind v4 base wired with an AI-cloner skill (`/clone-website`) that reverse-engineers a real website pixel-perfectly and then re-skins its copy/branding for the user's SaaS idea.
14
-
15
- ## Single Source of Truth: `launchframe.config.json`
16
- At the project root there is a `launchframe.config.json` containing:
17
- - `url` the visual source-of-truth to clone
18
- - `idea` the SaaS idea used as the rebranding directive after the clone
19
-
20
- **Always read this file first** at the start of any cloning or build task. The `/clone-website` skill depends on it.
21
-
22
- ## What the user says (zero-setup flow)
23
- Users scaffold with `npx launchframe@latest <url> "<saas idea>"` — `npm install` already ran — then they open this folder and say **Build it** (or **Go**, **Ship it**, **Clone the site**).
24
-
25
- When you see that with no other instructions, **start the full clone-website pipeline immediately** using only `launchframe.config.json` for `url` and `idea`. Do not ask them to repeat the URL unless the config is missing or invalid. `/clone-website` is an alias for the same work.
26
-
27
- ## Tech Stack
28
- - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
29
- - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
30
- - **Motion:** **Framer Motion** (`framer-motion`) — **default for non-trivial animation** (scroll reveals, staggers, layout, gestures). Use CSS `transition` / `@keyframes` only when they reproduce the target exactly without JS.
31
- - **Icons:** Lucide React (default will be replaced/supplemented by extracted SVGs)
32
- - **Styling:** Tailwind CSS v4 with oklch design tokens
33
- - **Media:** Real **images & videos** from the target URL, saved under `public/images/` and `public/videos/` (see `.claude/skills/clone-website/SKILL.md` and `docs/research/INSPECTION_GUIDE.md`). Do not ship a “pretty shell” with missing raster/video unless extraction is **blocked** and documented in `docs/research/EXTRACTION_LIMITATIONS.md`.
34
- - **Deployment:** Vercel
35
-
36
- ## Priority: images, videos & motion
37
- Treat these as **first-class deliverables**, not polish at the end.
38
-
39
- 1. **Raster & video** — Early in recon, inventory every `<img>`, `<picture>` / `<source>`, `<video>`, poster image, and meaningful `background-image` URL. Download into `public/` and reference **local paths** in specs and components. Hero bands and marketing sections often fail visually when a single layer is skipped.
40
- 2. **Motion** — Match the target’s feel: easing, duration, stagger, scroll triggers. Prefer **`motion` from `framer-motion`** for entrance sequences, viewport-driven animations, shared-layout-style transitions, and anything beyond a one-off CSS transition. Note in each component spec whether behavior is **CSS-only** vs **Framer Motion**.
41
- 3. **Illustration & brand marks** — Inline **SVG React components** (not only Lucide) for motifs that repeat across sections: logo glyph variants, dividers, grain/noise overlays, hero “scene” shapes, feature-card mini-compositions. Prefer **`currentColor`** + CSS variables so SVGs inherit theme tokens. For **pixel art**, keep a tight palette (4–8 fills), consistent pixel grid logic, and use `style={{ imageRendering: "pixelated" }}` on upscaled raster OR build pixel SVG paths intentionally — never blurry upscale.
42
-
43
- ## Production polish for marketing landings *(idea-tailored visuals + motion + brand)*
44
-
45
- Use this whenever the page is **authored or minimalist** (internal templates, rebranded clones that still feel flat, or targets that are mostly typography). “Looks OK” is not ship-ready — **production landings** stack multiple visual layers, choreographed motion, and cues that clearly belong to **this** product (`launchframe.config.json#idea`), not any SaaS.
46
-
47
- ### Idea-tailored imagery *(uniqueness bar)*
48
-
49
- Generic decoration fails review. Apply this to **every** hero composition, feature-card illustration, OG image sketch, and major `public/` marketing raster.
50
-
51
- 1. **Derive metaphors from the idea** — Read `idea` (and product name). List 3–6 concrete nouns/verbs the product owns (e.g. voice → waveform, mic; notes → folded page, margin line; sync → paired arrows). Every bespoke visual must trace back to that list — **not** interchangeable clipart (random apparel, unrelated lifestyle objects, vague “business” silhouettes unless the idea demands them).
52
- 2. **Could this ship on another site unchanged?** If yes, redesign until **no** — different silhouette story, palette accent, or composition so the asset “only fits” this narrative.
53
- 3. **One tie-in sentence per asset** — In specs or `docs/research/REBRAND.md`, each image/SVG scene gets **Idea tie-in:** `<why this belongs to this product>`.
54
- 4. **Prefer authored scenes** — Custom SVG narratives (several shapes telling one moment), optional pixel mascot **on-brand** for the category, or composed raster under `public/images/marketing/` when illustration needs texture. Lucide-only piles and neutral blobs are **last resort**, not default.
55
- 5. **Distinct accents** — Pick accent hues/shapes suggested by the idea’s personality (precise studio vs warm companion vs rugged utility); avoid default gray-only SaaS anonymity unless the brief is explicitly brutalist.
56
-
57
- ### Imagery density (every fold earns a visual idea)
58
-
59
- - **Hero** — Never headline-only on white: add at least two of — soft gradient mesh / radial spotlight, **idea-specific** SVG cluster (metaphors from the list above), notebook/grid lines when the idea is docs, waveform device frame when the idea is capture, masked **purpose-built** raster in `public/images/marketing/`, geometric frame echoing **this** logo shape.
60
- - **Between sections** — Optional dividers whose pattern/stroke **echoes the product motif** (not a stock wave).
61
- - **Feature rows** — Each card illustration is a **different** moment in the same visual language (shared stroke weight, accent, or grid) — all still **idea-native** (e.g. capture → transcript lines; workspace → shared cursors; publish → export channels). No unrelated filler.
62
- - **Social proof** — Logo strip may use grayscale marks; add **slow infinite marquee** or gentle opacity drift — motion sells “living product.”
63
-
64
- ### Motion choreography *(ship several layers; respect `prefers-reduced-motion`)*
65
-
66
- Default minimum bar for authored landings implement with **`framer-motion`** unless matching CSS-only parity:
67
-
68
- | Tier | What users feel | Typical implementation |
69
- |------|-----------------|-------------------------|
70
- | **A Page load** | Hero headline, subcopy, CTAs, and hero art **stagger in** (opacity + `y`, or blur-in for type) | Parent `variants` + `staggerChildren`; durations 0.35–0.7s, ease `[0.22, 1, 0.36, 1]` or springs |
71
- | **B — Scroll** | Sections **ease up / fade** on first viewport entry; grids **stagger cards** | `whileInView` + `viewport.once`; `margin: "-80px"` tweak so reveals feel early |
72
- | **C Looping ambient** | Logo strip marquee; gradient drift; subtle SVG stroke dashoffset loop; “thinking…” **typing caret** | CSS `@keyframes` or Framer `animate` repeat; keep amplitude **low** |
73
- | **D — Interaction** | Buttons scale/shine on hover; cards **lift** (`translateY`, shadow); nav **backdrop blur / height** past threshold | `whileHover`, `whileTap`; scroll listener or Framer scroll hooks for nav |
74
- | **E Decorative depth** | Pointer parallax on hero cluster (2–4 layers at different strengths) OR scroll-linked `useTransform` | Small rotate/translate ranges (≤ 8px / ≤ 2deg) |
75
-
76
- Always gate looping motion: **`useReducedMotion()`** from Framer Motion — swap loops for static frames and shorten entrances.
77
-
78
- ### Brandability checklist *(distinctive, not generic SaaS gray)*
79
-
80
- - **Motif thread** One recurring visual hook (pen stroke, folded page corner, hub spark, pixel creature) reused in hero, favicon, OG image sketch, and one feature illustration.
81
- - **Accent discipline** Define **primary + secondary accent** in `:root` (even if mostly monochrome). Use accents on CTAs, SVG highlights, focus rings — not rainbow scatter.
82
- - **Wordmark lockup** SVG glyph + tracked type; provide **icon-only** variant for favicon / meta.
83
- - **OG & SEO assets** — Generate **`public/seo/og.png`** (or route og image) that includes motif + product name — not a bare screenshot.
84
-
85
- ### Where artifacts live
86
-
87
- - **Raster/video** — `public/images/`, `public/videos/` (see `MEDIA_MANIFEST.md`).
88
- - **SVG React illustrations** — Prefer `src/components/marketing/art/` or co-located `*-scene.tsx` modules; export named components (`HeroBackdrop`, `FeatureCaptureIllustration`).
89
- - **Pixel art** — Same folder pattern; document palette in file header comment.
90
-
91
- ### Spec requirement *(hand-off quality)*
92
-
93
- When writing `docs/research/components/*.spec.md`, add sections **Illustration** (**Idea tie-in** per asset, layers, SVG components, raster paths) and expand **Motion** with tier **A–E** coverage and reduced-motion fallback. Builders should not invent motion ad hoc — the spec states durations and triggers.
94
-
95
- ## Commands
96
- - `npm run dev` — Start dev server
97
- - `npm run build` — Production build
98
- - `npm run lint` — ESLint check
99
- - `npm run typecheck` TypeScript check
100
- - `npm run check` Run lint + typecheck + build
101
- - **`npm run recon`** — **Playwright** capture: full-page screenshots, `computed-snapshot.json`, `MEDIA_MANIFEST.md` (use when Browser MCP / Chrome DevTools MCP is broken or missing)
102
- - **`npm run recon:headed`** — Same as `recon` but **headed** Chromium (often better for WAF / “Just a moment…” pages)
103
-
104
- **Playwright browser binaries (once per machine):** `npx playwright install chromium`
105
-
106
- ## When Browser MCP is down
107
- Prefer **Playwright** for repeatable extraction in-repo — do **not** rely on Chrome DevTools MCP alone.
108
-
109
- 1. Run **`npm run recon`** (or **`npm run recon:headed`** if headless hits a challenge page).
110
- 2. Read **`docs/research/computed-snapshot.json`**, **`docs/research/MEDIA_MANIFEST.md`**, and **`docs/research/EXTRACTION_LIMITATIONS.md`** before writing specs.
111
- 3. Fill **`scripts/download-assets.mjs`** from `MEDIA_MANIFEST.md` and run it to populate `public/images/` and `public/videos/`.
112
-
113
- ## Code Style
114
- - TypeScript strict mode, no `any`
115
- - Named exports, PascalCase components, camelCase utils
116
- - Tailwind utility classes, no inline styles
117
- - 2-space indentation
118
- - Responsive: mobile-first
119
-
120
- ## Design Principles
121
- - **Images & video fidelity** — prefer real downloaded assets; preserve aspect ratio, `object-fit`, layering, and poster frames. Rebrand pass may **swap** URLs for IP-safe alternates but must keep layout identical.
122
- - **Motion fidelity** — timing and easing matter as much as color; use Framer Motion when CSS alone cannot match staggered or scroll-driven behavior.
123
- - **Idea-specific imagery** — Marketing art (SVG, raster, OG) must be **tailored to `launchframe.config.json#idea`**: explicit metaphors, per-asset **Idea tie-in** notes, and **no interchangeable filler** that could belong to any generic SaaS.
124
- - **Production landing density** — For authored/minimal pages, deliberately add **idea-specific** illustration (not generic SaaS filler), **pixel-art accents** when they reinforce the metaphor, and **tiered motion (A–E)** per “Production polish” above; static monochrome layouts are incomplete unless the user explicitly wants extreme minimalism.
125
- - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
126
- - **No personal aesthetic changes during emulation phase** — match 1:1 first, rebrand later
127
- - **Real content during extraction** — use actual text and assets from the target site so the clone scaffolds against real shapes
128
- - **Rebrand pass swaps copy, not visuals** — once the clone is built, replace product name, headlines, feature copy, and brand marks with content tuned to `launchframe.config.json#idea`. Do NOT alter spacing, color tokens, typography scale, animations, or responsive breakpoints during the rebrand.
129
- - **Beauty-first** — every pixel matters
130
-
131
- ## Project Structure
132
- ```
133
- src/
134
- app/ # Next.js routes
135
- components/ # React components
136
- ui/ # shadcn/ui primitives
137
- marketing/ # Landing sections + authored SVG scenes (`art/` recommended)
138
- icons.tsx # Extracted SVG icons as React components
139
- lib/
140
- utils.ts # cn() utility (shadcn)
141
- types/ # TypeScript interfaces
142
- hooks/ # Custom React hooks
143
- public/
144
- images/ # Downloaded images from target site
145
- videos/ # Downloaded videos from target site
146
- seo/ # Favicons, OG images, webmanifest
147
- docs/
148
- research/ # Inspection output (design tokens, components, layout)
149
- design-references/ # Screenshots and visual references
150
- scripts/ # Asset download scripts
151
- ```
152
-
153
- ## MOST IMPORTANT NOTES
154
- - **Always start by reading `launchframe.config.json`** — that file dictates the URL to clone and the SaaS idea to re-skin for.
155
- - 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.
156
- - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
157
- - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
158
-
159
- # Website Inspection Guide
160
-
161
- ## Priority (read first): media & motion
162
-
163
- Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
164
-
165
- ### 1. Images & video (do this before obsessing over utility classes)
166
-
167
- - [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
168
- - [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
169
- - [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
170
- - [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
171
- - [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
172
- - [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
173
-
174
- If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
175
-
176
- ### 2. Motion (prefer Framer Motion in this repo)
177
-
178
- - [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
179
- - [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
180
- - [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
181
- - [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
182
- - [ ] **Implementation rule** — use **`framer-motion`** for anything beyond trivial single-property CSS `transition`. Record **duration, easing, delay, stagger**, and **trigger** (scroll, hover, tap) in specs.
183
-
184
- ### 3. Idea-tailored illustration & motifs *(production landings)*
185
-
186
- When the reference page is **sparse** (mostly type + gray boxes) or after a **rebrand** the UI still reads generic, illustration is required — and it must be **unique to the SaaS idea** (`launchframe.config.json#idea`), not reusable wallpaper.
187
-
188
- - [ ] **Metaphor list** — 3–6 nouns/verbs derived from `idea`; every bespoke asset maps to ≥ one entry
189
- - [ ] **Uniqueness check** — If the scene works unchanged for another product category, revise
190
- - [ ] **Inline SVG** — hero shapes, dividers, card mini-scenes; note `viewBox`, **`currentColor`** vs fixed fills, **Idea tie-in** sentence per asset
191
- - [ ] **Pixel art / sprites** — only when character reinforces the metaphor; palette hex table; `imageRendering` / grid discipline
192
- - [ ] **Motif thread** — recurring element echoing hero + OG + favicon **for this product**, not a random geometric pattern
193
- - [ ] **Accent tokens** — primary/secondary roles aligned with idea personality (extract from reference or define in `:root`)
194
- - [ ] **Motion tiers A–E** — document with **reduced-motion** fallback (`prefers-reduced-motion`)
195
-
196
- See **`AGENTS.md` → Production polish for marketing landings** for tier definitions and folders (`src/components/marketing/art/`, `public/images/marketing/`).
197
-
198
- ---
199
-
200
- ## How to Reverse-Engineer Any Website
201
-
202
- This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
203
-
204
- ## Phase 1: Visual Audit
205
-
206
- ### Screenshots to Capture
207
- - [ ] Every distinct page — desktop, tablet, mobile
208
- - [ ] Dark mode variants (if applicable)
209
- - [ ] Light mode variants (if applicable)
210
- - [ ] Key interaction states (hover, active, open menus, modals)
211
- - [ ] Loading/skeleton states
212
- - [ ] Empty states
213
- - [ ] Error states
214
- - [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
215
- - [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
216
-
217
- ### Design Tokens to Extract
218
- - [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
219
- - [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
220
- - [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
221
- - [ ] **Border radius** — buttons, cards, avatars, inputs
222
- - [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
223
- - [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
224
- - [ ] **Icons** — which icon library? custom SVGs? sizes?
225
- - [ ] **Avatars** — sizes, shapes, fallback behavior
226
- - [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
227
- - [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
228
-
229
- ## Phase 2: Component Inventory
230
-
231
- For each distinct UI component, document:
232
- 1. **Name** — what would you call this component?
233
- 2. **Structure** — what HTML elements / child components does it contain?
234
- 3. **Variants** — does it have different sizes, colors, or states?
235
- 4. **States** — default, hover, active, disabled, loading, error, empty
236
- 5. **Responsive behavior** — how does it change at different breakpoints?
237
- 6. **Interactions** — click, hover, focus, keyboard navigation
238
- 7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
239
-
240
- ### Common Components to Look For
241
- - Navigation (top bar, sidebar, bottom bar)
242
- - Cards / list items
243
- - Buttons and links
244
- - Forms and inputs
245
- - Modals and dialogs
246
- - Dropdowns and menus
247
- - Tabs and segmented controls
248
- - Avatars and user badges
249
- - Loading skeletons
250
- - Toast notifications
251
- - Tooltips and popovers
252
- - **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
253
-
254
- ## Phase 3: Layout Architecture
255
-
256
- - [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
257
- - [ ] **Column layout** — how many columns at each breakpoint?
258
- - [ ] **Max-width** — main content area max-width
259
- - [ ] **Sticky elements** — header, sidebar, floating buttons
260
- - [ ] **Z-index layers** — navigation, modals, tooltips, overlays
261
- - [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
262
-
263
- ## Phase 4: Technical Stack Analysis
264
-
265
- - [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
266
- - [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
267
- - [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
268
- - [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
269
- - [ ] **Font loading** — Google Fonts, self-hosted, system fonts
270
- - [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
271
- - [ ] **Animation library** — site may use GSAP, Lottie, Rive, or CSS only — **in the Next.js clone, default to Framer Motion** unless a different lib is required for parity
272
-
273
- ## Phase 5: Documentation Output
274
-
275
- After inspection, create these files in `docs/research/`:
276
- 1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
277
- 2. `COMPONENT_INVENTORY.md` — Every component with structure notes
278
- 3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
279
- 4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
280
- 5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
281
- 6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
1
+ <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
+ Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
+
4
+ <!-- BEGIN:nextjs-agent-rules -->
5
+ # This is NOT the Next.js you know
6
+
7
+ 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/` before writing any code. Heed deprecation notices.
8
+ <!-- END:nextjs-agent-rules -->
9
+
10
+ # Website Reverse-Engineer Template
11
+
12
+ ## What This Is
13
+ 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> ...]`.
14
+
15
+ ## Tech Stack
16
+ - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
17
+ - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
18
+ - **Icons:** Lucide React (default will be replaced/supplemented by extracted SVGs)
19
+ - **Styling:** Tailwind CSS v4 with oklch design tokens
20
+ - **Deployment:** Vercel
21
+
22
+ ## Commands
23
+ - `npm run dev` — Start dev server
24
+ - `npm run build` — Production build
25
+ - `npm run lint` ESLint check
26
+ - `npm run typecheck` — TypeScript check
27
+ - `npm run check` — Run lint + typecheck + build
28
+
29
+ ## Code Style
30
+ - TypeScript strict mode, no `any`
31
+ - Named exports, PascalCase components, camelCase utils
32
+ - Tailwind utility classes, no inline styles
33
+ - 2-space indentation
34
+ - Responsive: mobile-first
35
+
36
+ ## Design Principles
37
+ - **Pixel-perfect emulation** match the target's spacing, colors, typography exactly
38
+ - **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
39
+ - **Real content** — use actual text and assets from the target site, not placeholders
40
+ - **Beauty-first** — every pixel matters
41
+
42
+ ## Project Structure
43
+ ```
44
+ src/
45
+ app/ # Next.js routes
46
+ components/ # React components
47
+ ui/ # shadcn/ui primitives
48
+ icons.tsx # Extracted SVG icons as React components
49
+ lib/
50
+ utils.ts # cn() utility (shadcn)
51
+ types/ # TypeScript interfaces
52
+ hooks/ # Custom React hooks
53
+ public/
54
+ images/ # Downloaded images from target site
55
+ videos/ # Downloaded videos from target site
56
+ seo/ # Favicons, OG images, webmanifest
57
+ docs/
58
+ research/ # Inspection output (design tokens, components, layout)
59
+ design-references/ # Screenshots and visual references
60
+ scripts/ # Asset download scripts
61
+ ```
62
+
63
+ ## MOST IMPORTANT NOTES
64
+ - 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.
65
+ - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
66
+ - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
67
+
68
+ # Website Inspection Guide
69
+
70
+ ## How to Reverse-Engineer Any Website
71
+
72
+ This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
73
+
74
+ ## Phase 1: Visual Audit
75
+
76
+ ### Screenshots to Capture
77
+ - [ ] Every distinct page — desktop, tablet, mobile
78
+ - [ ] Dark mode variants (if applicable)
79
+ - [ ] Light mode variants (if applicable)
80
+ - [ ] Key interaction states (hover, active, open menus, modals)
81
+ - [ ] Loading/skeleton states
82
+ - [ ] Empty states
83
+ - [ ] Error states
84
+
85
+ ### Design Tokens to Extract
86
+ - [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
87
+ - [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
88
+ - [ ] **Spacing**padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
89
+ - [ ] **Border radius** — buttons, cards, avatars, inputs
90
+ - [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
91
+ - [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
92
+ - [ ] **Icons** — which icon library? custom SVGs? sizes?
93
+ - [ ] **Avatars** sizes, shapes, fallback behavior
94
+ - [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
95
+ - [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
96
+
97
+ ## Phase 2: Component Inventory
98
+
99
+ For each distinct UI component, document:
100
+ 1. **Name**what would you call this component?
101
+ 2. **Structure** what HTML elements / child components does it contain?
102
+ 3. **Variants** does it have different sizes, colors, or states?
103
+ 4. **States** — default, hover, active, disabled, loading, error, empty
104
+ 5. **Responsive behavior** how does it change at different breakpoints?
105
+ 6. **Interactions** — click, hover, focus, keyboard navigation
106
+ 7. **Animations** transitions, entrance/exit animations, micro-interactions
107
+
108
+ ### Common Components to Look For
109
+ - Navigation (top bar, sidebar, bottom bar)
110
+ - Cards / list items
111
+ - Buttons and links
112
+ - Forms and inputs
113
+ - Modals and dialogs
114
+ - Dropdowns and menus
115
+ - Tabs and segmented controls
116
+ - Avatars and user badges
117
+ - Loading skeletons
118
+ - Toast notifications
119
+ - Tooltips and popovers
120
+
121
+ ## Phase 3: Layout Architecture
122
+
123
+ - [ ] **Grid system** CSS Grid? Flexbox? Fixed widths?
124
+ - [ ] **Column layout** how many columns at each breakpoint?
125
+ - [ ] **Max-width** — main content area max-width
126
+ - [ ] **Sticky elements** — header, sidebar, floating buttons
127
+ - [ ] **Z-index layers** — navigation, modals, tooltips, overlays
128
+ - [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
129
+
130
+ ## Phase 4: Technical Stack Analysis
131
+
132
+ - [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
133
+ - [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
134
+ - [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
135
+ - [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
136
+ - [ ] **Font loading** — Google Fonts, self-hosted, system fonts
137
+ - [ ] **Image strategy** CDN, lazy loading, srcset, WebP/AVIF
138
+ - [ ] **Animation library** Framer Motion, GSAP, CSS transitions only
139
+
140
+ ## Phase 5: Documentation Output
141
+
142
+ After inspection, create these files in `docs/research/`:
143
+ 1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
144
+ 2. `COMPONENT_INVENTORY.md` Every component with structure notes
145
+ 3. `LAYOUT_ARCHITECTURE.md` Page layouts, grid system, responsive behavior
146
+ 4. `INTERACTION_PATTERNS.md` Animations, transitions, hover states
147
+ 5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents