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,285 +1,151 @@
1
- <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
-
4
- ---
5
- description: Project conventions for AI Website Clone Template
6
- alwaysApply: true
7
- ---
8
- <!-- BEGIN:nextjs-agent-rules -->
9
- # This is NOT the Next.js you know
10
-
11
- 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.
12
- <!-- END:nextjs-agent-rules -->
13
-
14
- # Launchframe Project (AI Website Cloner + SaaS Rebrand)
15
-
16
- ## What This Is
17
- 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.
18
-
19
- ## Single Source of Truth: `launchframe.config.json`
20
- At the project root there is a `launchframe.config.json` containing:
21
- - `url` the visual source-of-truth to clone
22
- - `idea` the SaaS idea used as the rebranding directive after the clone
23
-
24
- **Always read this file first** at the start of any cloning or build task. The `/clone-website` skill depends on it.
25
-
26
- ## What the user says (zero-setup flow)
27
- 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**).
28
-
29
- 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.
30
-
31
- ## Tech Stack
32
- - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
33
- - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
34
- - **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.
35
- - **Icons:** Lucide React (default will be replaced/supplemented by extracted SVGs)
36
- - **Styling:** Tailwind CSS v4 with oklch design tokens
37
- - **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`.
38
- - **Deployment:** Vercel
39
-
40
- ## Priority: images, videos & motion
41
- Treat these as **first-class deliverables**, not polish at the end.
42
-
43
- 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.
44
- 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**.
45
- 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.
46
-
47
- ## Production polish for marketing landings *(idea-tailored visuals + motion + brand)*
48
-
49
- 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.
50
-
51
- ### Idea-tailored imagery *(uniqueness bar)*
52
-
53
- Generic decoration fails review. Apply this to **every** hero composition, feature-card illustration, OG image sketch, and major `public/` marketing raster.
54
-
55
- 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).
56
- 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.
57
- 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>`.
58
- 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.
59
- 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.
60
-
61
- ### Imagery density (every fold earns a visual idea)
62
-
63
- - **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.
64
- - **Between sections** — Optional dividers whose pattern/stroke **echoes the product motif** (not a stock wave).
65
- - **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.
66
- - **Social proof** — Logo strip may use grayscale marks; add **slow infinite marquee** or gentle opacity drift — motion sells “living product.”
67
-
68
- ### Motion choreography *(ship several layers; respect `prefers-reduced-motion`)*
69
-
70
- Default minimum bar for authored landings implement with **`framer-motion`** unless matching CSS-only parity:
71
-
72
- | Tier | What users feel | Typical implementation |
73
- |------|-----------------|-------------------------|
74
- | **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 |
75
- | **B — Scroll** | Sections **ease up / fade** on first viewport entry; grids **stagger cards** | `whileInView` + `viewport.once`; `margin: "-80px"` tweak so reveals feel early |
76
- | **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** |
77
- | **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 |
78
- | **E Decorative depth** | Pointer parallax on hero cluster (2–4 layers at different strengths) OR scroll-linked `useTransform` | Small rotate/translate ranges (≤ 8px / ≤ 2deg) |
79
-
80
- Always gate looping motion: **`useReducedMotion()`** from Framer Motion — swap loops for static frames and shorten entrances.
81
-
82
- ### Brandability checklist *(distinctive, not generic SaaS gray)*
83
-
84
- - **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.
85
- - **Accent discipline** Define **primary + secondary accent** in `:root` (even if mostly monochrome). Use accents on CTAs, SVG highlights, focus rings — not rainbow scatter.
86
- - **Wordmark lockup** SVG glyph + tracked type; provide **icon-only** variant for favicon / meta.
87
- - **OG & SEO assets** — Generate **`public/seo/og.png`** (or route og image) that includes motif + product name — not a bare screenshot.
88
-
89
- ### Where artifacts live
90
-
91
- - **Raster/video** — `public/images/`, `public/videos/` (see `MEDIA_MANIFEST.md`).
92
- - **SVG React illustrations** — Prefer `src/components/marketing/art/` or co-located `*-scene.tsx` modules; export named components (`HeroBackdrop`, `FeatureCaptureIllustration`).
93
- - **Pixel art** — Same folder pattern; document palette in file header comment.
94
-
95
- ### Spec requirement *(hand-off quality)*
96
-
97
- 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.
98
-
99
- ## Commands
100
- - `npm run dev` — Start dev server
101
- - `npm run build` — Production build
102
- - `npm run lint` — ESLint check
103
- - `npm run typecheck` TypeScript check
104
- - `npm run check` Run lint + typecheck + build
105
- - **`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)
106
- - **`npm run recon:headed`** — Same as `recon` but **headed** Chromium (often better for WAF / “Just a moment…” pages)
107
-
108
- **Playwright browser binaries (once per machine):** `npx playwright install chromium`
109
-
110
- ## When Browser MCP is down
111
- Prefer **Playwright** for repeatable extraction in-repo — do **not** rely on Chrome DevTools MCP alone.
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
+ ---
5
+ description: Project conventions for AI Website Clone Template
6
+ alwaysApply: true
7
+ ---
8
+ <!-- BEGIN:nextjs-agent-rules -->
9
+ # This is NOT the Next.js you know
10
+
11
+ 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.
12
+ <!-- END:nextjs-agent-rules -->
13
+
14
+ # Website Reverse-Engineer Template
15
+
16
+ ## What This Is
17
+ 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> ...]`.
18
+
19
+ ## Tech Stack
20
+ - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
21
+ - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
22
+ - **Icons:** Lucide React (default will be replaced/supplemented by extracted SVGs)
23
+ - **Styling:** Tailwind CSS v4 with oklch design tokens
24
+ - **Deployment:** Vercel
25
+
26
+ ## Commands
27
+ - `npm run dev` — Start dev server
28
+ - `npm run build` — Production build
29
+ - `npm run lint` ESLint check
30
+ - `npm run typecheck` — TypeScript check
31
+ - `npm run check` — Run lint + typecheck + build
32
+
33
+ ## Code Style
34
+ - TypeScript strict mode, no `any`
35
+ - Named exports, PascalCase components, camelCase utils
36
+ - Tailwind utility classes, no inline styles
37
+ - 2-space indentation
38
+ - Responsive: mobile-first
39
+
40
+ ## Design Principles
41
+ - **Pixel-perfect emulation** match the target's spacing, colors, typography exactly
42
+ - **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
43
+ - **Real content** — use actual text and assets from the target site, not placeholders
44
+ - **Beauty-first** — every pixel matters
45
+
46
+ ## Project Structure
47
+ ```
48
+ src/
49
+ app/ # Next.js routes
50
+ components/ # React components
51
+ ui/ # shadcn/ui primitives
52
+ icons.tsx # Extracted SVG icons as React components
53
+ lib/
54
+ utils.ts # cn() utility (shadcn)
55
+ types/ # TypeScript interfaces
56
+ hooks/ # Custom React hooks
57
+ public/
58
+ images/ # Downloaded images from target site
59
+ videos/ # Downloaded videos from target site
60
+ seo/ # Favicons, OG images, webmanifest
61
+ docs/
62
+ research/ # Inspection output (design tokens, components, layout)
63
+ design-references/ # Screenshots and visual references
64
+ scripts/ # Asset download scripts
65
+ ```
66
+
67
+ ## MOST IMPORTANT NOTES
68
+ - 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.
69
+ - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
70
+ - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
71
+
72
+ # Website Inspection Guide
73
+
74
+ ## How to Reverse-Engineer Any Website
75
+
76
+ This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
77
+
78
+ ## Phase 1: Visual Audit
79
+
80
+ ### Screenshots to Capture
81
+ - [ ] Every distinct page — desktop, tablet, mobile
82
+ - [ ] Dark mode variants (if applicable)
83
+ - [ ] Light mode variants (if applicable)
84
+ - [ ] Key interaction states (hover, active, open menus, modals)
85
+ - [ ] Loading/skeleton states
86
+ - [ ] Empty states
87
+ - [ ] Error states
88
+
89
+ ### Design Tokens to Extract
90
+ - [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
91
+ - [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
92
+ - [ ] **Spacing**padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
93
+ - [ ] **Border radius** — buttons, cards, avatars, inputs
94
+ - [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
95
+ - [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
96
+ - [ ] **Icons** — which icon library? custom SVGs? sizes?
97
+ - [ ] **Avatars** sizes, shapes, fallback behavior
98
+ - [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
99
+ - [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
100
+
101
+ ## Phase 2: Component Inventory
102
+
103
+ For each distinct UI component, document:
104
+ 1. **Name**what would you call this component?
105
+ 2. **Structure** what HTML elements / child components does it contain?
106
+ 3. **Variants** does it have different sizes, colors, or states?
107
+ 4. **States** — default, hover, active, disabled, loading, error, empty
108
+ 5. **Responsive behavior** how does it change at different breakpoints?
109
+ 6. **Interactions** — click, hover, focus, keyboard navigation
110
+ 7. **Animations** transitions, entrance/exit animations, micro-interactions
111
+
112
+ ### Common Components to Look For
113
+ - Navigation (top bar, sidebar, bottom bar)
114
+ - Cards / list items
115
+ - Buttons and links
116
+ - Forms and inputs
117
+ - Modals and dialogs
118
+ - Dropdowns and menus
119
+ - Tabs and segmented controls
120
+ - Avatars and user badges
121
+ - Loading skeletons
122
+ - Toast notifications
123
+ - Tooltips and popovers
124
+
125
+ ## Phase 3: Layout Architecture
126
+
127
+ - [ ] **Grid system** CSS Grid? Flexbox? Fixed widths?
128
+ - [ ] **Column layout** how many columns at each breakpoint?
129
+ - [ ] **Max-width** — main content area max-width
130
+ - [ ] **Sticky elements** — header, sidebar, floating buttons
131
+ - [ ] **Z-index layers** — navigation, modals, tooltips, overlays
132
+ - [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
133
+
134
+ ## Phase 4: Technical Stack Analysis
135
+
136
+ - [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
137
+ - [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
138
+ - [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
139
+ - [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
140
+ - [ ] **Font loading** — Google Fonts, self-hosted, system fonts
141
+ - [ ] **Image strategy** CDN, lazy loading, srcset, WebP/AVIF
142
+ - [ ] **Animation library** Framer Motion, GSAP, CSS transitions only
143
+
144
+ ## Phase 5: Documentation Output
145
+
146
+ After inspection, create these files in `docs/research/`:
147
+ 1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
148
+ 2. `COMPONENT_INVENTORY.md` Every component with structure notes
149
+ 3. `LAYOUT_ARCHITECTURE.md` Page layouts, grid system, responsive behavior
150
+ 4. `INTERACTION_PATTERNS.md` Animations, transitions, hover states
151
+ 5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents