launchframe 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -147
- package/bin/launchframe.mjs +315 -315
- package/package.json +1 -1
- package/template/.amazonq/cli-agents/clone-website.json +1 -1
- package/template/.amazonq/rules/project.md +120 -109
- package/template/.augment/commands/clone-website.md +1 -1
- package/template/.claude/skills/clone-website/SKILL.md +534 -534
- package/template/.clinerules +120 -109
- package/template/.codex/skills/clone-website/SKILL.md +1 -1
- package/template/.continue/commands/clone-website.md +1 -1
- package/template/.continue/rules/project.md +120 -109
- package/template/.cursor/commands/clone-website.md +1 -1
- package/template/.cursor/rules/project.mdc +22 -20
- package/template/.gemini/commands/clone-website.toml +1 -1
- package/template/.github/copilot-instructions.md +120 -109
- package/template/.github/skills/clone-website/SKILL.md +1 -1
- package/template/.opencode/commands/clone-website.md +1 -1
- package/template/.windsurf/workflows/clone-website.md +1 -1
- package/template/AGENTS.md +100 -89
- package/template/README.md +121 -120
- package/template/START_HERE.md +15 -15
- package/template/docs/design-references/playwright-example.com-1440px.png +0 -0
- package/template/docs/design-references/playwright-example.com-390px.png +0 -0
- package/template/docs/research/INSPECTION_GUIDE.md +109 -109
- package/template/package.json +63 -60
- package/template/scripts/recon-playwright.mjs +323 -0
package/template/.clinerules
CHANGED
|
@@ -45,6 +45,17 @@ Treat these as **first-class deliverables**, not polish at the end.
|
|
|
45
45
|
- `npm run lint` — ESLint check
|
|
46
46
|
- `npm run typecheck` — TypeScript check
|
|
47
47
|
- `npm run check` — Run lint + typecheck + build
|
|
48
|
+
- **`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)
|
|
49
|
+
- **`npm run recon:headed`** — Same as `recon` but **headed** Chromium (often better for WAF / “Just a moment…” pages)
|
|
50
|
+
|
|
51
|
+
**Playwright browser binaries (once per machine):** `npx playwright install chromium`
|
|
52
|
+
|
|
53
|
+
## When Browser MCP is down
|
|
54
|
+
Prefer **Playwright** for repeatable extraction in-repo — do **not** rely on Chrome DevTools MCP alone.
|
|
55
|
+
|
|
56
|
+
1. Run **`npm run recon`** (or **`npm run recon:headed`** if headless hits a challenge page).
|
|
57
|
+
2. Read **`docs/research/computed-snapshot.json`**, **`docs/research/MEDIA_MANIFEST.md`**, and **`docs/research/EXTRACTION_LIMITATIONS.md`** before writing specs.
|
|
58
|
+
3. Fill **`scripts/download-assets.mjs`** from `MEDIA_MANIFEST.md` and run it to populate `public/images/` and `public/videos/`.
|
|
48
59
|
|
|
49
60
|
## Code Style
|
|
50
61
|
- TypeScript strict mode, no `any`
|
|
@@ -89,112 +100,112 @@ scripts/ # Asset download scripts
|
|
|
89
100
|
- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
|
|
90
101
|
- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
|
|
91
102
|
|
|
92
|
-
# Website Inspection Guide
|
|
93
|
-
|
|
94
|
-
## Priority (read first): media & motion
|
|
95
|
-
|
|
96
|
-
Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
|
|
97
|
-
|
|
98
|
-
### 1. Images & video (do this before obsessing over utility classes)
|
|
99
|
-
|
|
100
|
-
- [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
|
|
101
|
-
- [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
|
|
102
|
-
- [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
|
|
103
|
-
- [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
|
|
104
|
-
- [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
|
|
105
|
-
- [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
|
|
106
|
-
|
|
107
|
-
If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
|
|
108
|
-
|
|
109
|
-
### 2. Motion (prefer Framer Motion in this repo)
|
|
110
|
-
|
|
111
|
-
- [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
|
|
112
|
-
- [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
|
|
113
|
-
- [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
|
|
114
|
-
- [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
|
|
115
|
-
- [ ] **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.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## How to Reverse-Engineer Any Website
|
|
120
|
-
|
|
121
|
-
This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
|
|
122
|
-
|
|
123
|
-
## Phase 1: Visual Audit
|
|
124
|
-
|
|
125
|
-
### Screenshots to Capture
|
|
126
|
-
- [ ] Every distinct page — desktop, tablet, mobile
|
|
127
|
-
- [ ] Dark mode variants (if applicable)
|
|
128
|
-
- [ ] Light mode variants (if applicable)
|
|
129
|
-
- [ ] Key interaction states (hover, active, open menus, modals)
|
|
130
|
-
- [ ] Loading/skeleton states
|
|
131
|
-
- [ ] Empty states
|
|
132
|
-
- [ ] Error states
|
|
133
|
-
- [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
|
|
134
|
-
- [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
|
|
135
|
-
|
|
136
|
-
### Design Tokens to Extract
|
|
137
|
-
- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
|
|
138
|
-
- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
|
|
139
|
-
- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
|
|
140
|
-
- [ ] **Border radius** — buttons, cards, avatars, inputs
|
|
141
|
-
- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
|
|
142
|
-
- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
|
|
143
|
-
- [ ] **Icons** — which icon library? custom SVGs? sizes?
|
|
144
|
-
- [ ] **Avatars** — sizes, shapes, fallback behavior
|
|
145
|
-
- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
|
|
146
|
-
- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
|
|
147
|
-
|
|
148
|
-
## Phase 2: Component Inventory
|
|
149
|
-
|
|
150
|
-
For each distinct UI component, document:
|
|
151
|
-
1. **Name** — what would you call this component?
|
|
152
|
-
2. **Structure** — what HTML elements / child components does it contain?
|
|
153
|
-
3. **Variants** — does it have different sizes, colors, or states?
|
|
154
|
-
4. **States** — default, hover, active, disabled, loading, error, empty
|
|
155
|
-
5. **Responsive behavior** — how does it change at different breakpoints?
|
|
156
|
-
6. **Interactions** — click, hover, focus, keyboard navigation
|
|
157
|
-
7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
|
|
158
|
-
|
|
159
|
-
### Common Components to Look For
|
|
160
|
-
- Navigation (top bar, sidebar, bottom bar)
|
|
161
|
-
- Cards / list items
|
|
162
|
-
- Buttons and links
|
|
163
|
-
- Forms and inputs
|
|
164
|
-
- Modals and dialogs
|
|
165
|
-
- Dropdowns and menus
|
|
166
|
-
- Tabs and segmented controls
|
|
167
|
-
- Avatars and user badges
|
|
168
|
-
- Loading skeletons
|
|
169
|
-
- Toast notifications
|
|
170
|
-
- Tooltips and popovers
|
|
171
|
-
- **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
|
|
172
|
-
|
|
173
|
-
## Phase 3: Layout Architecture
|
|
174
|
-
|
|
175
|
-
- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
|
|
176
|
-
- [ ] **Column layout** — how many columns at each breakpoint?
|
|
177
|
-
- [ ] **Max-width** — main content area max-width
|
|
178
|
-
- [ ] **Sticky elements** — header, sidebar, floating buttons
|
|
179
|
-
- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
|
|
180
|
-
- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
|
|
181
|
-
|
|
182
|
-
## Phase 4: Technical Stack Analysis
|
|
183
|
-
|
|
184
|
-
- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
|
|
185
|
-
- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
|
|
186
|
-
- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
|
|
187
|
-
- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
|
|
188
|
-
- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
|
|
189
|
-
- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
|
|
190
|
-
- [ ] **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
|
|
191
|
-
|
|
192
|
-
## Phase 5: Documentation Output
|
|
193
|
-
|
|
194
|
-
After inspection, create these files in `docs/research/`:
|
|
195
|
-
1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
|
|
196
|
-
2. `COMPONENT_INVENTORY.md` — Every component with structure notes
|
|
197
|
-
3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
|
|
198
|
-
4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
|
|
199
|
-
5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
|
|
200
|
-
6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
|
|
103
|
+
# Website Inspection Guide
|
|
104
|
+
|
|
105
|
+
## Priority (read first): media & motion
|
|
106
|
+
|
|
107
|
+
Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
|
|
108
|
+
|
|
109
|
+
### 1. Images & video (do this before obsessing over utility classes)
|
|
110
|
+
|
|
111
|
+
- [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
|
|
112
|
+
- [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
|
|
113
|
+
- [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
|
|
114
|
+
- [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
|
|
115
|
+
- [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
|
|
116
|
+
- [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
|
|
117
|
+
|
|
118
|
+
If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
|
|
119
|
+
|
|
120
|
+
### 2. Motion (prefer Framer Motion in this repo)
|
|
121
|
+
|
|
122
|
+
- [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
|
|
123
|
+
- [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
|
|
124
|
+
- [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
|
|
125
|
+
- [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
|
|
126
|
+
- [ ] **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.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## How to Reverse-Engineer Any Website
|
|
131
|
+
|
|
132
|
+
This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
|
|
133
|
+
|
|
134
|
+
## Phase 1: Visual Audit
|
|
135
|
+
|
|
136
|
+
### Screenshots to Capture
|
|
137
|
+
- [ ] Every distinct page — desktop, tablet, mobile
|
|
138
|
+
- [ ] Dark mode variants (if applicable)
|
|
139
|
+
- [ ] Light mode variants (if applicable)
|
|
140
|
+
- [ ] Key interaction states (hover, active, open menus, modals)
|
|
141
|
+
- [ ] Loading/skeleton states
|
|
142
|
+
- [ ] Empty states
|
|
143
|
+
- [ ] Error states
|
|
144
|
+
- [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
|
|
145
|
+
- [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
|
|
146
|
+
|
|
147
|
+
### Design Tokens to Extract
|
|
148
|
+
- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
|
|
149
|
+
- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
|
|
150
|
+
- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
|
|
151
|
+
- [ ] **Border radius** — buttons, cards, avatars, inputs
|
|
152
|
+
- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
|
|
153
|
+
- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
|
|
154
|
+
- [ ] **Icons** — which icon library? custom SVGs? sizes?
|
|
155
|
+
- [ ] **Avatars** — sizes, shapes, fallback behavior
|
|
156
|
+
- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
|
|
157
|
+
- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
|
|
158
|
+
|
|
159
|
+
## Phase 2: Component Inventory
|
|
160
|
+
|
|
161
|
+
For each distinct UI component, document:
|
|
162
|
+
1. **Name** — what would you call this component?
|
|
163
|
+
2. **Structure** — what HTML elements / child components does it contain?
|
|
164
|
+
3. **Variants** — does it have different sizes, colors, or states?
|
|
165
|
+
4. **States** — default, hover, active, disabled, loading, error, empty
|
|
166
|
+
5. **Responsive behavior** — how does it change at different breakpoints?
|
|
167
|
+
6. **Interactions** — click, hover, focus, keyboard navigation
|
|
168
|
+
7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
|
|
169
|
+
|
|
170
|
+
### Common Components to Look For
|
|
171
|
+
- Navigation (top bar, sidebar, bottom bar)
|
|
172
|
+
- Cards / list items
|
|
173
|
+
- Buttons and links
|
|
174
|
+
- Forms and inputs
|
|
175
|
+
- Modals and dialogs
|
|
176
|
+
- Dropdowns and menus
|
|
177
|
+
- Tabs and segmented controls
|
|
178
|
+
- Avatars and user badges
|
|
179
|
+
- Loading skeletons
|
|
180
|
+
- Toast notifications
|
|
181
|
+
- Tooltips and popovers
|
|
182
|
+
- **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
|
|
183
|
+
|
|
184
|
+
## Phase 3: Layout Architecture
|
|
185
|
+
|
|
186
|
+
- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
|
|
187
|
+
- [ ] **Column layout** — how many columns at each breakpoint?
|
|
188
|
+
- [ ] **Max-width** — main content area max-width
|
|
189
|
+
- [ ] **Sticky elements** — header, sidebar, floating buttons
|
|
190
|
+
- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
|
|
191
|
+
- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
|
|
192
|
+
|
|
193
|
+
## Phase 4: Technical Stack Analysis
|
|
194
|
+
|
|
195
|
+
- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
|
|
196
|
+
- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
|
|
197
|
+
- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
|
|
198
|
+
- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
|
|
199
|
+
- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
|
|
200
|
+
- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
|
|
201
|
+
- [ ] **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
|
|
202
|
+
|
|
203
|
+
## Phase 5: Documentation Output
|
|
204
|
+
|
|
205
|
+
After inspection, create these files in `docs/research/`:
|
|
206
|
+
1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
|
|
207
|
+
2. `COMPONENT_INVENTORY.md` — Every component with structure notes
|
|
208
|
+
3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
|
|
209
|
+
4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
|
|
210
|
+
5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
|
|
211
|
+
6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
|
|
@@ -39,7 +39,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
39
39
|
## Pre-Flight
|
|
40
40
|
|
|
41
41
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
42
|
-
2. **Browser automation
|
|
42
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
43
43
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
44
44
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
45
45
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|
|
@@ -41,7 +41,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
41
41
|
## Pre-Flight
|
|
42
42
|
|
|
43
43
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
44
|
-
2. **Browser automation
|
|
44
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
45
45
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
46
46
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
47
47
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|
|
@@ -49,6 +49,17 @@ Treat these as **first-class deliverables**, not polish at the end.
|
|
|
49
49
|
- `npm run lint` — ESLint check
|
|
50
50
|
- `npm run typecheck` — TypeScript check
|
|
51
51
|
- `npm run check` — Run lint + typecheck + build
|
|
52
|
+
- **`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)
|
|
53
|
+
- **`npm run recon:headed`** — Same as `recon` but **headed** Chromium (often better for WAF / “Just a moment…” pages)
|
|
54
|
+
|
|
55
|
+
**Playwright browser binaries (once per machine):** `npx playwright install chromium`
|
|
56
|
+
|
|
57
|
+
## When Browser MCP is down
|
|
58
|
+
Prefer **Playwright** for repeatable extraction in-repo — do **not** rely on Chrome DevTools MCP alone.
|
|
59
|
+
|
|
60
|
+
1. Run **`npm run recon`** (or **`npm run recon:headed`** if headless hits a challenge page).
|
|
61
|
+
2. Read **`docs/research/computed-snapshot.json`**, **`docs/research/MEDIA_MANIFEST.md`**, and **`docs/research/EXTRACTION_LIMITATIONS.md`** before writing specs.
|
|
62
|
+
3. Fill **`scripts/download-assets.mjs`** from `MEDIA_MANIFEST.md` and run it to populate `public/images/` and `public/videos/`.
|
|
52
63
|
|
|
53
64
|
## Code Style
|
|
54
65
|
- TypeScript strict mode, no `any`
|
|
@@ -93,112 +104,112 @@ scripts/ # Asset download scripts
|
|
|
93
104
|
- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
|
|
94
105
|
- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
|
|
95
106
|
|
|
96
|
-
# Website Inspection Guide
|
|
97
|
-
|
|
98
|
-
## Priority (read first): media & motion
|
|
99
|
-
|
|
100
|
-
Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
|
|
101
|
-
|
|
102
|
-
### 1. Images & video (do this before obsessing over utility classes)
|
|
103
|
-
|
|
104
|
-
- [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
|
|
105
|
-
- [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
|
|
106
|
-
- [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
|
|
107
|
-
- [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
|
|
108
|
-
- [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
|
|
109
|
-
- [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
|
|
110
|
-
|
|
111
|
-
If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
|
|
112
|
-
|
|
113
|
-
### 2. Motion (prefer Framer Motion in this repo)
|
|
114
|
-
|
|
115
|
-
- [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
|
|
116
|
-
- [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
|
|
117
|
-
- [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
|
|
118
|
-
- [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
|
|
119
|
-
- [ ] **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.
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## How to Reverse-Engineer Any Website
|
|
124
|
-
|
|
125
|
-
This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
|
|
126
|
-
|
|
127
|
-
## Phase 1: Visual Audit
|
|
128
|
-
|
|
129
|
-
### Screenshots to Capture
|
|
130
|
-
- [ ] Every distinct page — desktop, tablet, mobile
|
|
131
|
-
- [ ] Dark mode variants (if applicable)
|
|
132
|
-
- [ ] Light mode variants (if applicable)
|
|
133
|
-
- [ ] Key interaction states (hover, active, open menus, modals)
|
|
134
|
-
- [ ] Loading/skeleton states
|
|
135
|
-
- [ ] Empty states
|
|
136
|
-
- [ ] Error states
|
|
137
|
-
- [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
|
|
138
|
-
- [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
|
|
139
|
-
|
|
140
|
-
### Design Tokens to Extract
|
|
141
|
-
- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
|
|
142
|
-
- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
|
|
143
|
-
- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
|
|
144
|
-
- [ ] **Border radius** — buttons, cards, avatars, inputs
|
|
145
|
-
- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
|
|
146
|
-
- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
|
|
147
|
-
- [ ] **Icons** — which icon library? custom SVGs? sizes?
|
|
148
|
-
- [ ] **Avatars** — sizes, shapes, fallback behavior
|
|
149
|
-
- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
|
|
150
|
-
- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
|
|
151
|
-
|
|
152
|
-
## Phase 2: Component Inventory
|
|
153
|
-
|
|
154
|
-
For each distinct UI component, document:
|
|
155
|
-
1. **Name** — what would you call this component?
|
|
156
|
-
2. **Structure** — what HTML elements / child components does it contain?
|
|
157
|
-
3. **Variants** — does it have different sizes, colors, or states?
|
|
158
|
-
4. **States** — default, hover, active, disabled, loading, error, empty
|
|
159
|
-
5. **Responsive behavior** — how does it change at different breakpoints?
|
|
160
|
-
6. **Interactions** — click, hover, focus, keyboard navigation
|
|
161
|
-
7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
|
|
162
|
-
|
|
163
|
-
### Common Components to Look For
|
|
164
|
-
- Navigation (top bar, sidebar, bottom bar)
|
|
165
|
-
- Cards / list items
|
|
166
|
-
- Buttons and links
|
|
167
|
-
- Forms and inputs
|
|
168
|
-
- Modals and dialogs
|
|
169
|
-
- Dropdowns and menus
|
|
170
|
-
- Tabs and segmented controls
|
|
171
|
-
- Avatars and user badges
|
|
172
|
-
- Loading skeletons
|
|
173
|
-
- Toast notifications
|
|
174
|
-
- Tooltips and popovers
|
|
175
|
-
- **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
|
|
176
|
-
|
|
177
|
-
## Phase 3: Layout Architecture
|
|
178
|
-
|
|
179
|
-
- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
|
|
180
|
-
- [ ] **Column layout** — how many columns at each breakpoint?
|
|
181
|
-
- [ ] **Max-width** — main content area max-width
|
|
182
|
-
- [ ] **Sticky elements** — header, sidebar, floating buttons
|
|
183
|
-
- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
|
|
184
|
-
- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
|
|
185
|
-
|
|
186
|
-
## Phase 4: Technical Stack Analysis
|
|
187
|
-
|
|
188
|
-
- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
|
|
189
|
-
- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
|
|
190
|
-
- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
|
|
191
|
-
- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
|
|
192
|
-
- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
|
|
193
|
-
- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
|
|
194
|
-
- [ ] **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
|
|
195
|
-
|
|
196
|
-
## Phase 5: Documentation Output
|
|
197
|
-
|
|
198
|
-
After inspection, create these files in `docs/research/`:
|
|
199
|
-
1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
|
|
200
|
-
2. `COMPONENT_INVENTORY.md` — Every component with structure notes
|
|
201
|
-
3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
|
|
202
|
-
4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
|
|
203
|
-
5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
|
|
204
|
-
6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
|
|
107
|
+
# Website Inspection Guide
|
|
108
|
+
|
|
109
|
+
## Priority (read first): media & motion
|
|
110
|
+
|
|
111
|
+
Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
|
|
112
|
+
|
|
113
|
+
### 1. Images & video (do this before obsessing over utility classes)
|
|
114
|
+
|
|
115
|
+
- [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
|
|
116
|
+
- [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
|
|
117
|
+
- [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
|
|
118
|
+
- [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
|
|
119
|
+
- [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
|
|
120
|
+
- [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
|
|
121
|
+
|
|
122
|
+
If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
|
|
123
|
+
|
|
124
|
+
### 2. Motion (prefer Framer Motion in this repo)
|
|
125
|
+
|
|
126
|
+
- [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
|
|
127
|
+
- [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
|
|
128
|
+
- [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
|
|
129
|
+
- [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
|
|
130
|
+
- [ ] **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.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## How to Reverse-Engineer Any Website
|
|
135
|
+
|
|
136
|
+
This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
|
|
137
|
+
|
|
138
|
+
## Phase 1: Visual Audit
|
|
139
|
+
|
|
140
|
+
### Screenshots to Capture
|
|
141
|
+
- [ ] Every distinct page — desktop, tablet, mobile
|
|
142
|
+
- [ ] Dark mode variants (if applicable)
|
|
143
|
+
- [ ] Light mode variants (if applicable)
|
|
144
|
+
- [ ] Key interaction states (hover, active, open menus, modals)
|
|
145
|
+
- [ ] Loading/skeleton states
|
|
146
|
+
- [ ] Empty states
|
|
147
|
+
- [ ] Error states
|
|
148
|
+
- [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
|
|
149
|
+
- [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
|
|
150
|
+
|
|
151
|
+
### Design Tokens to Extract
|
|
152
|
+
- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
|
|
153
|
+
- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
|
|
154
|
+
- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
|
|
155
|
+
- [ ] **Border radius** — buttons, cards, avatars, inputs
|
|
156
|
+
- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
|
|
157
|
+
- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
|
|
158
|
+
- [ ] **Icons** — which icon library? custom SVGs? sizes?
|
|
159
|
+
- [ ] **Avatars** — sizes, shapes, fallback behavior
|
|
160
|
+
- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
|
|
161
|
+
- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
|
|
162
|
+
|
|
163
|
+
## Phase 2: Component Inventory
|
|
164
|
+
|
|
165
|
+
For each distinct UI component, document:
|
|
166
|
+
1. **Name** — what would you call this component?
|
|
167
|
+
2. **Structure** — what HTML elements / child components does it contain?
|
|
168
|
+
3. **Variants** — does it have different sizes, colors, or states?
|
|
169
|
+
4. **States** — default, hover, active, disabled, loading, error, empty
|
|
170
|
+
5. **Responsive behavior** — how does it change at different breakpoints?
|
|
171
|
+
6. **Interactions** — click, hover, focus, keyboard navigation
|
|
172
|
+
7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
|
|
173
|
+
|
|
174
|
+
### Common Components to Look For
|
|
175
|
+
- Navigation (top bar, sidebar, bottom bar)
|
|
176
|
+
- Cards / list items
|
|
177
|
+
- Buttons and links
|
|
178
|
+
- Forms and inputs
|
|
179
|
+
- Modals and dialogs
|
|
180
|
+
- Dropdowns and menus
|
|
181
|
+
- Tabs and segmented controls
|
|
182
|
+
- Avatars and user badges
|
|
183
|
+
- Loading skeletons
|
|
184
|
+
- Toast notifications
|
|
185
|
+
- Tooltips and popovers
|
|
186
|
+
- **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
|
|
187
|
+
|
|
188
|
+
## Phase 3: Layout Architecture
|
|
189
|
+
|
|
190
|
+
- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
|
|
191
|
+
- [ ] **Column layout** — how many columns at each breakpoint?
|
|
192
|
+
- [ ] **Max-width** — main content area max-width
|
|
193
|
+
- [ ] **Sticky elements** — header, sidebar, floating buttons
|
|
194
|
+
- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
|
|
195
|
+
- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
|
|
196
|
+
|
|
197
|
+
## Phase 4: Technical Stack Analysis
|
|
198
|
+
|
|
199
|
+
- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
|
|
200
|
+
- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
|
|
201
|
+
- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
|
|
202
|
+
- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
|
|
203
|
+
- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
|
|
204
|
+
- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
|
|
205
|
+
- [ ] **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
|
|
206
|
+
|
|
207
|
+
## Phase 5: Documentation Output
|
|
208
|
+
|
|
209
|
+
After inspection, create these files in `docs/research/`:
|
|
210
|
+
1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
|
|
211
|
+
2. `COMPONENT_INVENTORY.md` — Every component with structure notes
|
|
212
|
+
3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
|
|
213
|
+
4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
|
|
214
|
+
5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
|
|
215
|
+
6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
|
|
@@ -36,7 +36,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
36
36
|
## Pre-Flight
|
|
37
37
|
|
|
38
38
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
39
|
-
2. **Browser automation
|
|
39
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
40
40
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
41
41
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
42
42
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Launchframe — open folder, say "Build it", full clone + rebrand pipeline
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
This is a **Launchframe** project: `launchframe.config.json` holds the target `url` and SaaS `idea`. `AGENTS.md` is the extended source of truth.
|
|
7
|
-
|
|
8
|
-
## Shorthand (what users actually type)
|
|
9
|
-
|
|
10
|
-
When the user says **Build it**, **Go**, **Ship it**, **Clone the site**, **Run launchframe**, or similar, with **no** new URL or idea in the same message:
|
|
11
|
-
|
|
12
|
-
1. Read `launchframe.config.json` first (authoritative `url` + `idea`).
|
|
13
|
-
2. Execute the **full** workflow described in `AGENTS.md` and in `.cursor/commands/clone-website.md` (recon → foundation → component specs → build → SaaS rebrand pass → assembly → QA).
|
|
14
|
-
3. Continue until `npm run build` passes unless the user stops you.
|
|
15
|
-
|
|
16
|
-
Do **not** ask the user to re-type the URL or idea unless the config is missing or broken. Optional: use **`/clone-website`** as the explicit slash-command alias.
|
|
17
|
-
|
|
18
|
-
## Browser automation
|
|
19
|
-
|
|
20
|
-
If no Browser MCP is available
|
|
1
|
+
---
|
|
2
|
+
description: Launchframe — open folder, say "Build it", full clone + rebrand pipeline
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
This is a **Launchframe** project: `launchframe.config.json` holds the target `url` and SaaS `idea`. `AGENTS.md` is the extended source of truth.
|
|
7
|
+
|
|
8
|
+
## Shorthand (what users actually type)
|
|
9
|
+
|
|
10
|
+
When the user says **Build it**, **Go**, **Ship it**, **Clone the site**, **Run launchframe**, or similar, with **no** new URL or idea in the same message:
|
|
11
|
+
|
|
12
|
+
1. Read `launchframe.config.json` first (authoritative `url` + `idea`).
|
|
13
|
+
2. Execute the **full** workflow described in `AGENTS.md` and in `.cursor/commands/clone-website.md` (recon → foundation → component specs → build → SaaS rebrand pass → assembly → QA).
|
|
14
|
+
3. Continue until `npm run build` passes unless the user stops you.
|
|
15
|
+
|
|
16
|
+
Do **not** ask the user to re-type the URL or idea unless the config is missing or broken. Optional: use **`/clone-website`** as the explicit slash-command alias.
|
|
17
|
+
|
|
18
|
+
## Browser automation
|
|
19
|
+
|
|
20
|
+
If no Browser MCP is available **or Chrome DevTools MCP is in an error state**, run **`npm run recon`** (Playwright) — then continue the pipeline from `docs/research/computed-snapshot.json` and `MEDIA_MANIFEST.md`. Use **`npm run recon:headed`** for tough WAF pages. Install browsers once: **`npx playwright install chromium`**.
|
|
21
|
+
|
|
22
|
+
If Playwright still hits a challenge page, document it in **`docs/research/EXTRACTION_LIMITATIONS.md`** and fall back only as a last resort.
|
|
@@ -40,7 +40,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
40
40
|
## Pre-Flight
|
|
41
41
|
|
|
42
42
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
43
|
-
2. **Browser automation
|
|
43
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
44
44
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
45
45
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
46
46
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|