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
package/.clinerules CHANGED
@@ -1,285 +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**: stabilized **full-document** scrolling at **desktop + mobile**, merged **`computed-snapshot.json`** + **`MEDIA_MANIFEST.md`**, **full-page** screenshots under `docs/design-references/` (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
- ### Full landing coverage (agents + automation)
110
-
111
- Whether using MCP or Playwright, extraction must cover the **entire visible landing** (hero → footer): slow-scroll until lazy content settles, then **`fullPage`** screenshots — never treat “what fits in one viewport” as sufficient for inventory or specs.
112
-
113
- 1. Run **`npm run recon`** (or **`npm run recon:headed`** if headless hits a challenge page).
114
- 2. Read **`docs/research/computed-snapshot.json`**, **`docs/research/MEDIA_MANIFEST.md`**, and **`docs/research/EXTRACTION_LIMITATIONS.md`** before writing specs.
115
- 3. Fill **`scripts/download-assets.mjs`** from `MEDIA_MANIFEST.md` and run it to populate `public/images/` and `public/videos/`.
116
-
117
- ## Code Style
118
- - TypeScript strict mode, no `any`
119
- - Named exports, PascalCase components, camelCase utils
120
- - Tailwind utility classes, no inline styles
121
- - 2-space indentation
122
- - Responsive: mobile-first
123
-
124
- ## Design Principles
125
- - **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.
126
- - **Motion fidelity** — timing and easing matter as much as color; use Framer Motion when CSS alone cannot match staggered or scroll-driven behavior.
127
- - **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.
128
- - **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.
129
- - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
130
- - **No personal aesthetic changes during emulation phase** — match 1:1 first, rebrand later
131
- - **Real content during extraction** — use actual text and assets from the target site so the clone scaffolds against real shapes
132
- - **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.
133
- - **Beauty-first** — every pixel matters
134
-
135
- ## Project Structure
136
- ```
137
- src/
138
- app/ # Next.js routes
139
- components/ # React components
140
- ui/ # shadcn/ui primitives
141
- marketing/ # Landing sections + authored SVG scenes (`art/` recommended)
142
- icons.tsx # Extracted SVG icons as React components
143
- lib/
144
- utils.ts # cn() utility (shadcn)
145
- types/ # TypeScript interfaces
146
- hooks/ # Custom React hooks
147
- public/
148
- images/ # Downloaded images from target site
149
- videos/ # Downloaded videos from target site
150
- seo/ # Favicons, OG images, webmanifest
151
- docs/
152
- research/ # Inspection output (design tokens, components, layout)
153
- design-references/ # Screenshots and visual references
154
- scripts/ # Asset download scripts
155
- ```
156
-
157
- ## MOST IMPORTANT NOTES
158
- - **Always start by reading `launchframe.config.json`** — that file dictates the URL to clone and the SaaS idea to re-skin for.
159
- - 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.
160
- - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
161
- - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
162
-
163
- # Website Inspection Guide
164
-
165
- ## Priority (read first): media & motion
166
-
167
- Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
168
-
169
- ### 1. Images & video (do this before obsessing over utility classes)
170
-
171
- - [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
172
- - [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
173
- - [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
174
- - [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
175
- - [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
176
- - [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
177
-
178
- If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
179
-
180
- ### 2. Motion (prefer Framer Motion in this repo)
181
-
182
- - [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
183
- - [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
184
- - [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
185
- - [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
186
- - [ ] **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.
187
-
188
- ### 3. Idea-tailored illustration & motifs *(production landings)*
189
-
190
- 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.
191
-
192
- - [ ] **Metaphor list** — 3–6 nouns/verbs derived from `idea`; every bespoke asset maps to ≥ one entry
193
- - [ ] **Uniqueness check** — If the scene works unchanged for another product category, revise
194
- - [ ] **Inline SVG** — hero shapes, dividers, card mini-scenes; note `viewBox`, **`currentColor`** vs fixed fills, **Idea tie-in** sentence per asset
195
- - [ ] **Pixel art / sprites** — only when character reinforces the metaphor; palette hex table; `imageRendering` / grid discipline
196
- - [ ] **Motif thread** — recurring element echoing hero + OG + favicon **for this product**, not a random geometric pattern
197
- - [ ] **Accent tokens** — primary/secondary roles aligned with idea personality (extract from reference or define in `:root`)
198
- - [ ] **Motion tiers A–E** — document with **reduced-motion** fallback (`prefers-reduced-motion`)
199
-
200
- See **`AGENTS.md` → Production polish for marketing landings** for tier definitions and folders (`src/components/marketing/art/`, `public/images/marketing/`).
201
-
202
- ---
203
-
204
- ## How to Reverse-Engineer Any Website
205
-
206
- This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
207
-
208
- ## Phase 1: Visual Audit
209
-
210
- ### Screenshots to Capture
211
- - [ ] Every distinct page — desktop, tablet, mobile
212
- - [ ] Dark mode variants (if applicable)
213
- - [ ] Light mode variants (if applicable)
214
- - [ ] Key interaction states (hover, active, open menus, modals)
215
- - [ ] Loading/skeleton states
216
- - [ ] Empty states
217
- - [ ] Error states
218
- - [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
219
- - [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
220
-
221
- ### Design Tokens to Extract
222
- - [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
223
- - [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
224
- - [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
225
- - [ ] **Border radius** — buttons, cards, avatars, inputs
226
- - [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
227
- - [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
228
- - [ ] **Icons** — which icon library? custom SVGs? sizes?
229
- - [ ] **Avatars** — sizes, shapes, fallback behavior
230
- - [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
231
- - [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
232
-
233
- ## Phase 2: Component Inventory
234
-
235
- For each distinct UI component, document:
236
- 1. **Name** — what would you call this component?
237
- 2. **Structure** — what HTML elements / child components does it contain?
238
- 3. **Variants** — does it have different sizes, colors, or states?
239
- 4. **States** — default, hover, active, disabled, loading, error, empty
240
- 5. **Responsive behavior** — how does it change at different breakpoints?
241
- 6. **Interactions** — click, hover, focus, keyboard navigation
242
- 7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
243
-
244
- ### Common Components to Look For
245
- - Navigation (top bar, sidebar, bottom bar)
246
- - Cards / list items
247
- - Buttons and links
248
- - Forms and inputs
249
- - Modals and dialogs
250
- - Dropdowns and menus
251
- - Tabs and segmented controls
252
- - Avatars and user badges
253
- - Loading skeletons
254
- - Toast notifications
255
- - Tooltips and popovers
256
- - **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
257
-
258
- ## Phase 3: Layout Architecture
259
-
260
- - [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
261
- - [ ] **Column layout** — how many columns at each breakpoint?
262
- - [ ] **Max-width** — main content area max-width
263
- - [ ] **Sticky elements** — header, sidebar, floating buttons
264
- - [ ] **Z-index layers** — navigation, modals, tooltips, overlays
265
- - [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
266
-
267
- ## Phase 4: Technical Stack Analysis
268
-
269
- - [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
270
- - [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
271
- - [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
272
- - [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
273
- - [ ] **Font loading** — Google Fonts, self-hosted, system fonts
274
- - [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
275
- - [ ] **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
276
-
277
- ## Phase 5: Documentation Output
278
-
279
- After inspection, create these files in `docs/research/`:
280
- 1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
281
- 2. `COMPONENT_INVENTORY.md` — Every component with structure notes
282
- 3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
283
- 4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
284
- 5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
285
- 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