@veyralabs/skills 0.1.0 → 0.3.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.
- package/README.md +65 -101
- package/bin/cli.js +84 -40
- package/commands/brandaudit.md +3 -0
- package/commands/competitornames.md +3 -0
- package/commands/domainforge.md +3 -0
- package/commands/namingguide.md +3 -0
- package/commands/webcloner.md +5 -0
- package/install.sh +24 -1
- package/package.json +4 -3
- package/skills/webcloner/SKILL.md +565 -0
- package/skills/webcloner/references/animation-playbook.md +292 -0
- package/skills/webcloner/references/behavior-spec-format.md +259 -0
- package/skills/webcloner/references/component-detection.md +209 -0
- package/skills/webcloner/references/stack-presets.md +328 -0
- package/skills/webcloner/scripts/compare.mjs +87 -0
- package/skills/webcloner/scripts/download-assets.mjs +160 -0
- package/skills/webcloner/scripts/extract.py +344 -0
- package/validate.js +14 -4
- /package/skills/{brandaudit → naming-suite/brandaudit}/SKILL.md +0 -0
- /package/skills/{brandaudit → naming-suite/brandaudit}/references/audit-framework.md +0 -0
- /package/skills/{brandaudit → naming-suite/brandaudit}/references/examples/sample-audits.md +0 -0
- /package/skills/{brandaudit → naming-suite/brandaudit}/references/rebrand-decisions.md +0 -0
- /package/skills/{brandaudit → naming-suite/brandaudit}/references/weakness-patterns.md +0 -0
- /package/skills/{competitornames → naming-suite/competitornames}/SKILL.md +0 -0
- /package/skills/{competitornames → naming-suite/competitornames}/references/examples/sample-analyses.md +0 -0
- /package/skills/{competitornames → naming-suite/competitornames}/references/pattern-analysis.md +0 -0
- /package/skills/{competitornames → naming-suite/competitornames}/references/whitespace-mapping.md +0 -0
- /package/skills/{domainforge → naming-suite/domainforge}/SKILL.md +0 -0
- /package/skills/{domainforge → naming-suite/domainforge}/references/brand-archetypes.md +0 -0
- /package/skills/{domainforge → naming-suite/domainforge}/references/examples/sample-outputs.md +0 -0
- /package/skills/{domainforge → naming-suite/domainforge}/references/naming-patterns.md +0 -0
- /package/skills/{domainforge → naming-suite/domainforge}/references/scoring-rubric.md +0 -0
- /package/skills/{domainforge → naming-suite/domainforge}/references/tld-strategy.md +0 -0
- /package/skills/{namingguide → naming-suite/namingguide}/SKILL.md +0 -0
- /package/skills/{namingguide → naming-suite/namingguide}/references/examples/sample-guides.md +0 -0
- /package/skills/{namingguide → naming-suite/namingguide}/references/guide-structure.md +0 -0
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webcloner
|
|
3
|
+
description: >
|
|
4
|
+
Website Cloner. Activate when a user wants to clone, replicate, or rebuild a website's visual design.
|
|
5
|
+
Triggers on: "clone this website", "replicate this landing page", "rebuild this design in Next.js",
|
|
6
|
+
"copy the layout of this site", "I want my site to look like X", "recreate this homepage".
|
|
7
|
+
Designed for landings, marketing sites, portfolios, and ecommerce storefronts — not web applications,
|
|
8
|
+
dashboards, or SaaS products with auth flows. Produces a pixel-accurate clone using spec-driven
|
|
9
|
+
parallel construction with automated extraction.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# WebCloner — Website Visual Cloning
|
|
13
|
+
|
|
14
|
+
You are a senior front-end engineer and design systems expert. Your job is to produce a pixel-accurate
|
|
15
|
+
visual clone of a target website — not a content copy, a visual clone. Same layout, same spacing,
|
|
16
|
+
same typography, same interactions, same feel.
|
|
17
|
+
|
|
18
|
+
Most cloning attempts fail at 80% because they guess at interactions, miss assets, or skip the
|
|
19
|
+
extraction phase. This skill forces the right order: extract first, build second, QA third.
|
|
20
|
+
|
|
21
|
+
## Scope — What This Skill Handles
|
|
22
|
+
|
|
23
|
+
**In scope:**
|
|
24
|
+
- Landing pages
|
|
25
|
+
- Marketing sites
|
|
26
|
+
- Portfolio sites
|
|
27
|
+
- Ecommerce storefronts (product listings, product pages, cart)
|
|
28
|
+
- Single-page promotional sites
|
|
29
|
+
- Agency / studio sites
|
|
30
|
+
|
|
31
|
+
**Out of scope (do not attempt):**
|
|
32
|
+
- SaaS dashboards or admin panels
|
|
33
|
+
- Web apps with authentication flows
|
|
34
|
+
- Sites with heavy real-time data (live prices, feeds, WebSockets)
|
|
35
|
+
- Full ecommerce checkout + payment flows
|
|
36
|
+
- Anything requiring server-side business logic to render
|
|
37
|
+
|
|
38
|
+
If the target is out of scope, say so immediately and explain why. Don't attempt a partial clone
|
|
39
|
+
that will fail half-way through.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Prerequisites
|
|
44
|
+
|
|
45
|
+
Before starting, verify these are available:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Python 3.10+ with Scrapling
|
|
49
|
+
pip install scrapling
|
|
50
|
+
scrapling install # installs Playwright browsers
|
|
51
|
+
|
|
52
|
+
# Node 18+
|
|
53
|
+
node --version
|
|
54
|
+
|
|
55
|
+
# Check if Chrome MCP is available in this session
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If Scrapling is not installed, offer the manual extraction fallback (see `references/manual-fallback.md`).
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Mode Selection
|
|
63
|
+
|
|
64
|
+
Ask the user which mode they need, or infer from context:
|
|
65
|
+
|
|
66
|
+
| Mode | When to use |
|
|
67
|
+
|------|-------------|
|
|
68
|
+
| `inspect` | "What would it take to clone this?" — analysis only, no files created |
|
|
69
|
+
| `spec` | Extract everything, produce spec files, no code written yet |
|
|
70
|
+
| `build` | Build from an existing spec (offline, no target URL needed) |
|
|
71
|
+
| `clone` | Full end-to-end: inspect → spec → build → QA |
|
|
72
|
+
| `update` | A section of an existing clone needs refreshing |
|
|
73
|
+
|
|
74
|
+
Default when user gives a URL with no other context: **`clone` mode**.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Phase 1 — Reconnaissance (`inspect` + start of `clone`)
|
|
79
|
+
|
|
80
|
+
**Goal:** Understand the site completely before touching any code.
|
|
81
|
+
|
|
82
|
+
### 1.1 — Initial fetch with Scrapling
|
|
83
|
+
|
|
84
|
+
Run `scripts/extract.py` with the target URL:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
python scripts/extract.py <url> --output docs/site-manifest.json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This produces `docs/site-manifest.json` with:
|
|
91
|
+
- Tech stack detection (framework, CSS library, animation libraries)
|
|
92
|
+
- DOM structure (sections, components, hierarchy)
|
|
93
|
+
- Computed CSS for every visible element
|
|
94
|
+
- Asset inventory (images, videos, fonts, SVGs)
|
|
95
|
+
- Color palette extracted from computed styles
|
|
96
|
+
- Typography system (font families, sizes, weights, line heights)
|
|
97
|
+
- Detected breakpoints
|
|
98
|
+
- Animation library signatures
|
|
99
|
+
|
|
100
|
+
### 1.2 — Take screenshots
|
|
101
|
+
|
|
102
|
+
Using Chrome MCP or Playwright:
|
|
103
|
+
|
|
104
|
+
```javascript
|
|
105
|
+
// Desktop (1440px)
|
|
106
|
+
await page.setViewportSize({ width: 1440, height: 900 });
|
|
107
|
+
await page.screenshot({ path: 'docs/screenshots/desktop.png', fullPage: true });
|
|
108
|
+
|
|
109
|
+
// Tablet (768px)
|
|
110
|
+
await page.setViewportSize({ width: 768, height: 1024 });
|
|
111
|
+
await page.screenshot({ path: 'docs/screenshots/tablet.png', fullPage: true });
|
|
112
|
+
|
|
113
|
+
// Mobile (390px)
|
|
114
|
+
await page.setViewportSize({ width: 390, height: 844 });
|
|
115
|
+
await page.screenshot({ path: 'docs/screenshots/mobile.png', fullPage: true });
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 1.3 — Interaction sweep
|
|
119
|
+
|
|
120
|
+
Manually (or via Playwright) perform:
|
|
121
|
+
|
|
122
|
+
1. **Scroll sweep** — Scroll entire page top to bottom. Watch for:
|
|
123
|
+
- Header changes (shrink, color change, blur)
|
|
124
|
+
- Elements appearing on scroll (fade-in, slide-in)
|
|
125
|
+
- Parallax movement
|
|
126
|
+
- Scroll-snap sections
|
|
127
|
+
- Sticky elements (nav, CTA bars)
|
|
128
|
+
- Progress bars
|
|
129
|
+
|
|
130
|
+
2. **Click sweep** — Click every interactive element:
|
|
131
|
+
- Navigation links (does it SPA-navigate or hard reload?)
|
|
132
|
+
- Tabs, accordions, carousels
|
|
133
|
+
- Modals, drawers, tooltips
|
|
134
|
+
- CTAs (destination + any animation)
|
|
135
|
+
|
|
136
|
+
3. **Hover sweep** — Hover over:
|
|
137
|
+
- Navigation items (dropdowns, underlines, color shifts)
|
|
138
|
+
- Cards and buttons (shadow, scale, color changes)
|
|
139
|
+
- Images (zoom, overlay)
|
|
140
|
+
|
|
141
|
+
4. **Responsive sweep** — At 1440, 1024, 768, 390:
|
|
142
|
+
- What reflows? (columns → stack, desktop nav → hamburger)
|
|
143
|
+
- What disappears? (decorative elements, sidebar)
|
|
144
|
+
- What changes size? (typography scale, spacing)
|
|
145
|
+
|
|
146
|
+
### 1.4 — Animation library detection
|
|
147
|
+
|
|
148
|
+
From the manifest + manual inspection:
|
|
149
|
+
|
|
150
|
+
```javascript
|
|
151
|
+
// Check for GSAP
|
|
152
|
+
window.gsap !== undefined
|
|
153
|
+
window.ScrollTrigger !== undefined
|
|
154
|
+
|
|
155
|
+
// Check for Framer Motion
|
|
156
|
+
document.querySelector('[data-framer-appear]') !== null
|
|
157
|
+
// or look for motion-* classes in React components
|
|
158
|
+
|
|
159
|
+
// Check for Lenis smooth scroll
|
|
160
|
+
window.lenis !== undefined
|
|
161
|
+
document.documentElement.classList.contains('lenis')
|
|
162
|
+
|
|
163
|
+
// Check for AOS
|
|
164
|
+
document.querySelector('[data-aos]') !== null
|
|
165
|
+
|
|
166
|
+
// Check for custom CSS animations
|
|
167
|
+
// Look in stylesheets for @keyframes
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Document findings in `docs/site-manifest.json` → `animations` section.
|
|
171
|
+
|
|
172
|
+
### 1.5 — Write reconnaissance summary
|
|
173
|
+
|
|
174
|
+
Create `docs/RECON.md`:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
# Reconnaissance — [Site Name]
|
|
178
|
+
|
|
179
|
+
## Tech Stack
|
|
180
|
+
- Framework detected: [React/Vue/static/Webflow/etc.]
|
|
181
|
+
- CSS: [Tailwind/custom/styled-components/etc.]
|
|
182
|
+
- Animation: [GSAP/Framer Motion/Lenis/CSS only/none]
|
|
183
|
+
- Font delivery: [Google Fonts/Adobe/self-hosted/variable]
|
|
184
|
+
|
|
185
|
+
## Page Structure
|
|
186
|
+
[List of sections top to bottom with estimated complexity]
|
|
187
|
+
1. Header/Nav — sticky, shrinks on scroll
|
|
188
|
+
2. Hero — full-viewport, parallax background, Lenis scroll
|
|
189
|
+
3. Features — 3-column grid, tab-switch behavior
|
|
190
|
+
...
|
|
191
|
+
|
|
192
|
+
## Key Behaviors
|
|
193
|
+
[The 3-5 most complex interactions that could break the clone]
|
|
194
|
+
- Header: transitions from transparent to white at 80px scroll
|
|
195
|
+
- Features: tabs switch on click, NOT on scroll
|
|
196
|
+
- ...
|
|
197
|
+
|
|
198
|
+
## Complexity Assessment
|
|
199
|
+
- Total sections: N
|
|
200
|
+
- Sections with complex behavior: N
|
|
201
|
+
- Animation library: [name or "none"]
|
|
202
|
+
- Estimated build time: [X-Y hours]
|
|
203
|
+
|
|
204
|
+
## Interaction Model Decisions
|
|
205
|
+
⚠️ MUST decide before building:
|
|
206
|
+
- [ ] Features section: scroll-driven or click-driven? → [ANSWER]
|
|
207
|
+
- [ ] Hero animation: CSS or JS? → [ANSWER]
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Do not start building until RECON.md is complete and reviewed.**
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Phase 2 — Foundation
|
|
215
|
+
|
|
216
|
+
**Goal:** Set up the target project and apply global styles before any components.
|
|
217
|
+
|
|
218
|
+
### 2.1 — Project setup
|
|
219
|
+
|
|
220
|
+
If no target project exists:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
npx create-next-app@latest clone --typescript --tailwind --app --src-dir --import-alias "@/*"
|
|
224
|
+
cd clone
|
|
225
|
+
npx shadcn@latest init
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 2.2 — Apply global tokens from manifest
|
|
229
|
+
|
|
230
|
+
From `docs/site-manifest.json`:
|
|
231
|
+
|
|
232
|
+
**Fonts** — update `app/layout.tsx`:
|
|
233
|
+
```typescript
|
|
234
|
+
// Use next/font for self-hosted or Google Fonts
|
|
235
|
+
// Match exact weights and subsets detected in manifest
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Colors** — update `app/globals.css`:
|
|
239
|
+
```css
|
|
240
|
+
:root {
|
|
241
|
+
/* Exact values from manifest → colorPalette */
|
|
242
|
+
--color-bg: [value];
|
|
243
|
+
--color-text: [value];
|
|
244
|
+
/* ... */
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Typography scale** — add to `globals.css`:
|
|
249
|
+
```css
|
|
250
|
+
/* Match exact font-size, line-height, letter-spacing from manifest */
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Keyframe animations** — add any `@keyframes` detected in the original.
|
|
254
|
+
|
|
255
|
+
**Scroll behavior** — if Lenis detected:
|
|
256
|
+
```bash
|
|
257
|
+
npm install lenis
|
|
258
|
+
```
|
|
259
|
+
Create `src/components/LenisProvider.tsx` matching original config.
|
|
260
|
+
|
|
261
|
+
**If GSAP detected:**
|
|
262
|
+
```bash
|
|
263
|
+
npm install gsap
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**If Framer Motion detected:**
|
|
267
|
+
```bash
|
|
268
|
+
npm install framer-motion
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### 2.3 — Download all assets
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
node scripts/download-assets.mjs docs/site-manifest.json public/
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
This downloads all images, videos, and self-hosted fonts to `public/` and converts raster images to WebP.
|
|
278
|
+
|
|
279
|
+
Verify the download report — any failed assets must be resolved before building components.
|
|
280
|
+
|
|
281
|
+
### 2.4 — Extract SVGs
|
|
282
|
+
|
|
283
|
+
From the manifest `assets.svgs` array, create `src/components/icons.tsx` with all inline SVGs,
|
|
284
|
+
deduplicated by content hash.
|
|
285
|
+
|
|
286
|
+
### 2.5 — Verify build passes
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
npm run build
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Zero errors before any component work. Fix TypeScript config issues now.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Phase 3 — Component Specification
|
|
297
|
+
|
|
298
|
+
**Goal:** Produce a complete spec for each section before dispatching any builder agent.
|
|
299
|
+
|
|
300
|
+
### 3.1 — Component boundary detection
|
|
301
|
+
|
|
302
|
+
From `docs/site-manifest.json` → `sections`, identify boundaries:
|
|
303
|
+
|
|
304
|
+
**Heuristics:**
|
|
305
|
+
- Full-width containers with distinct background = new section
|
|
306
|
+
- Repeated structure (cards, features) = one component with props
|
|
307
|
+
- Navigation + header = one component
|
|
308
|
+
- Footer = one component
|
|
309
|
+
- Modal/overlay = one component, separate from trigger
|
|
310
|
+
|
|
311
|
+
Common mistake: splitting one logical component into many because the DOM is deeply nested.
|
|
312
|
+
If a section has sub-elements that only appear together, it's one component.
|
|
313
|
+
|
|
314
|
+
### 3.2 — Write spec file for each section
|
|
315
|
+
|
|
316
|
+
For each section, create `docs/specs/[section-name].spec.md`:
|
|
317
|
+
|
|
318
|
+
```markdown
|
|
319
|
+
# [Section Name] — Spec
|
|
320
|
+
|
|
321
|
+
## Screenshot
|
|
322
|
+
[attach section screenshot from docs/screenshots/desktop.png — crop]
|
|
323
|
+
|
|
324
|
+
## DOM Structure
|
|
325
|
+
[describe exact HTML structure — tag names, nesting, text content verbatim]
|
|
326
|
+
|
|
327
|
+
## Computed Styles
|
|
328
|
+
[from manifest — exact CSS property values for key elements]
|
|
329
|
+
- Container: max-width: 1200px, padding: 0 80px, background: #fff
|
|
330
|
+
- Headline: font-size: 64px, font-weight: 700, line-height: 1.1, letter-spacing: -0.02em
|
|
331
|
+
- ...
|
|
332
|
+
|
|
333
|
+
## Responsive Behavior
|
|
334
|
+
| Breakpoint | Changes |
|
|
335
|
+
|------------|---------|
|
|
336
|
+
| 1440px | [baseline] |
|
|
337
|
+
| 1024px | [what changes] |
|
|
338
|
+
| 768px | [what changes] |
|
|
339
|
+
| 390px | [what changes] |
|
|
340
|
+
|
|
341
|
+
## States & Behaviors
|
|
342
|
+
[Structured YAML — see references/behavior-spec-format.md]
|
|
343
|
+
|
|
344
|
+
behaviors:
|
|
345
|
+
- name: "Tab switch"
|
|
346
|
+
trigger:
|
|
347
|
+
type: click
|
|
348
|
+
selector: ".tab-button"
|
|
349
|
+
states:
|
|
350
|
+
default:
|
|
351
|
+
content: [tab 1 content]
|
|
352
|
+
activeTab: 0
|
|
353
|
+
tab-2:
|
|
354
|
+
content: [tab 2 content]
|
|
355
|
+
activeTab: 1
|
|
356
|
+
transition:
|
|
357
|
+
duration: 200ms
|
|
358
|
+
easing: ease-out
|
|
359
|
+
|
|
360
|
+
## Assets Used
|
|
361
|
+
- Hero background: public/images/hero-bg.webp
|
|
362
|
+
- Feature icon 1: public/images/icon-speed.svg
|
|
363
|
+
- ...
|
|
364
|
+
|
|
365
|
+
## Content (verbatim)
|
|
366
|
+
[Copy exact text from the site — do not paraphrase]
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Spec quality checklist before dispatch:**
|
|
370
|
+
- [ ] Screenshot attached or referenced
|
|
371
|
+
- [ ] DOM structure described (not guessed)
|
|
372
|
+
- [ ] All text content is verbatim (not paraphrased)
|
|
373
|
+
- [ ] All states listed (hover, active, each tab, each accordion item)
|
|
374
|
+
- [ ] Responsive behavior documented at all 4 breakpoints
|
|
375
|
+
- [ ] Assets reference downloaded files in `public/`, not original URLs
|
|
376
|
+
- [ ] Interaction model decided (scroll-driven vs click-driven)
|
|
377
|
+
- [ ] Behavior spec is YAML, not prose
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Phase 4 — Parallel Build
|
|
382
|
+
|
|
383
|
+
**Goal:** Build each section simultaneously using git worktrees.
|
|
384
|
+
|
|
385
|
+
### 4.1 — Dispatch builder agents
|
|
386
|
+
|
|
387
|
+
For each spec file, create a worktree and dispatch a builder agent:
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
git worktree add ../clone-[section] -b build/[section]
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Each agent receives:
|
|
394
|
+
1. The full spec file content (inlined in the prompt)
|
|
395
|
+
2. The target stack (Next.js + TypeScript + Tailwind v4 + shadcn)
|
|
396
|
+
3. This constraint set:
|
|
397
|
+
- Match computed CSS values exactly — no approximations
|
|
398
|
+
- Use downloaded assets in `public/` — no external URLs
|
|
399
|
+
- Export a single typed component with all content as props
|
|
400
|
+
- Must pass `npm run build` before reporting done
|
|
401
|
+
- Test at 1440, 768, 390 by resizing the browser
|
|
402
|
+
- Implement ALL states listed in the spec
|
|
403
|
+
|
|
404
|
+
### 4.2 — Builder agent prompt template
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
Build the [SectionName] component for a website clone.
|
|
408
|
+
|
|
409
|
+
SPEC:
|
|
410
|
+
[paste full spec content]
|
|
411
|
+
|
|
412
|
+
CONSTRAINTS:
|
|
413
|
+
- Stack: Next.js 15, TypeScript strict, Tailwind v4, shadcn/ui
|
|
414
|
+
- Assets: already downloaded to public/ — use Next.js Image or <img> with these paths
|
|
415
|
+
- Typography: global font tokens already set in globals.css — reference CSS variables
|
|
416
|
+
- Animation library available: [name or "none"]
|
|
417
|
+
- Match every CSS value in the spec exactly
|
|
418
|
+
- All text is verbatim from the spec — do not alter copy
|
|
419
|
+
|
|
420
|
+
OUTPUT:
|
|
421
|
+
- src/components/sections/[SectionName].tsx
|
|
422
|
+
- Must compile with zero TypeScript errors
|
|
423
|
+
- Must render at 1440, 768, 390 without horizontal overflow
|
|
424
|
+
|
|
425
|
+
Report: what was built, any deviations from spec (reason required), build status.
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### 4.3 — Merge sequence
|
|
429
|
+
|
|
430
|
+
Merge worktrees one at a time, top to bottom (page order):
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
git merge build/[section] --no-ff
|
|
434
|
+
npm run build # verify after each merge
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Fix any TypeScript conflicts before merging the next worktree.
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## Phase 5 — Assembly
|
|
442
|
+
|
|
443
|
+
**Goal:** Wire all components into the final page layout.
|
|
444
|
+
|
|
445
|
+
### 5.1 — Update `src/app/page.tsx`
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
import Hero from '@/components/sections/Hero'
|
|
449
|
+
import Features from '@/components/sections/Features'
|
|
450
|
+
// ... all sections
|
|
451
|
+
|
|
452
|
+
export default function Page() {
|
|
453
|
+
return (
|
|
454
|
+
<main>
|
|
455
|
+
<Hero />
|
|
456
|
+
<Features />
|
|
457
|
+
{/* ... in DOM order from original */}
|
|
458
|
+
</main>
|
|
459
|
+
)
|
|
460
|
+
}
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### 5.2 — Implement page-level behaviors
|
|
464
|
+
|
|
465
|
+
Things that span multiple sections — implement in layout, not in individual components:
|
|
466
|
+
|
|
467
|
+
- **Sticky header** with scroll-triggered style changes
|
|
468
|
+
- **Smooth scroll provider** (Lenis wrap around everything)
|
|
469
|
+
- **GSAP ScrollTrigger context** (if used)
|
|
470
|
+
- **Dark/light transitions** that span sections
|
|
471
|
+
- **Scroll progress indicators**
|
|
472
|
+
|
|
473
|
+
### 5.3 — Final asset pass
|
|
474
|
+
|
|
475
|
+
Check `public/` — every file referenced in components must exist.
|
|
476
|
+
Replace any remaining external URLs with local paths.
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## Phase 6 — Visual QA
|
|
481
|
+
|
|
482
|
+
**Goal:** Find and fix all deviations before declaring done.
|
|
483
|
+
|
|
484
|
+
### 6.1 — Side-by-side comparison
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
node scripts/compare.mjs <original-url> http://localhost:3000
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
This captures screenshots of both at 1440 and 390, outputs a diff report.
|
|
491
|
+
|
|
492
|
+
### 6.2 — Manual QA checklist
|
|
493
|
+
|
|
494
|
+
**Visual:**
|
|
495
|
+
- [ ] Typography matches (font, size, weight, line-height, letter-spacing)
|
|
496
|
+
- [ ] Colors match (backgrounds, text, borders, shadows)
|
|
497
|
+
- [ ] Spacing matches (padding, margins, gaps)
|
|
498
|
+
- [ ] Images load and are the right size/ratio
|
|
499
|
+
- [ ] Icons render correctly (SVGs, icon fonts)
|
|
500
|
+
- [ ] Layout matches at 1440, 1024, 768, 390
|
|
501
|
+
|
|
502
|
+
**Interactions:**
|
|
503
|
+
- [ ] Scroll behaviors (header, parallax, animations)
|
|
504
|
+
- [ ] Click behaviors (tabs, accordions, modals)
|
|
505
|
+
- [ ] Hover effects
|
|
506
|
+
- [ ] Smooth scroll feels the same as original
|
|
507
|
+
|
|
508
|
+
**Technical:**
|
|
509
|
+
- [ ] No console errors
|
|
510
|
+
- [ ] No layout shifts (CLS)
|
|
511
|
+
- [ ] No horizontal overflow at any breakpoint
|
|
512
|
+
- [ ] `npm run build` passes
|
|
513
|
+
|
|
514
|
+
### 6.3 — Deviation reporting
|
|
515
|
+
|
|
516
|
+
For each deviation found, create a fix task:
|
|
517
|
+
```
|
|
518
|
+
DEVIATION: [section] — [what's wrong]
|
|
519
|
+
ORIGINAL: [exact value or behavior]
|
|
520
|
+
CLONE: [what we have]
|
|
521
|
+
FIX: [what to change]
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
Fix deviations one section at a time, rebuilding after each batch.
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## Update Mode
|
|
529
|
+
|
|
530
|
+
When a section of an existing clone needs refreshing:
|
|
531
|
+
|
|
532
|
+
1. Run `extract.py --section [selector]` to re-extract just that section
|
|
533
|
+
2. Diff the new manifest against the existing spec file
|
|
534
|
+
3. Update only the changed parts of the spec
|
|
535
|
+
4. Dispatch a builder agent with the updated spec + instruction to patch the existing component
|
|
536
|
+
5. Run visual QA on the updated section only
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## Anti-Patterns — What Goes Wrong
|
|
541
|
+
|
|
542
|
+
**Don't start building without a complete spec.** The number one failure mode is building
|
|
543
|
+
components from memory or screenshots without extracted CSS values. Everything drifts.
|
|
544
|
+
|
|
545
|
+
**Don't approximate CSS values.** `padding: roughly 80px` is not the same as `padding: 80px 96px`.
|
|
546
|
+
Use the manifest values exactly.
|
|
547
|
+
|
|
548
|
+
**Don't use placeholder images.** Every image must be the downloaded asset. Placeholder sizes
|
|
549
|
+
are always wrong and cause layout drift.
|
|
550
|
+
|
|
551
|
+
**Don't name tabs without clicking them.** Tab content must be extracted state by state.
|
|
552
|
+
If you haven't clicked each tab, you don't know the content.
|
|
553
|
+
|
|
554
|
+
**Don't skip the interaction model decision.** Scroll-driven vs click-driven is the most common
|
|
555
|
+
cause of complete component rewrites. Decide before dispatch.
|
|
556
|
+
|
|
557
|
+
**Don't merge without building.** TypeScript errors compound. Merge → build → fix → repeat.
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
Reference files:
|
|
562
|
+
- `references/animation-playbook.md` — GSAP, Framer Motion, Lenis extraction + recreation
|
|
563
|
+
- `references/behavior-spec-format.md` — YAML schema for behavioral specs
|
|
564
|
+
- `references/component-detection.md` — Boundary detection algorithm
|
|
565
|
+
- `references/stack-presets.md` — Output configs for Astro, Nuxt, SvelteKit
|