Web Clone deprecated
Hard-deprecated. Do not invoke or route this skill. Use $visual-ralph directly for live-URL visual implementation and visual QA workflows.
Included:
- Layout structure (header, nav, content areas, sidebar, footer)
- Typography (font families, sizes, weights, line heights)
- Colors, spacing, borders, border-radius
- Core interactions: navigation links, buttons, form elements, dropdowns, modals, toggles
- Responsive hints from the extracted layout (flexbox/grid patterns)
Excluded:
- Backend API integration or data fetching
- Authentication flows or protected content
- Dynamic/personalized content (user-specific data)
- Multi-page crawling or route graph cloning
- Third-party widget functionality (maps, embeds, chat widgets)
- Image/asset replication (use placeholders for external images)
Legal notice: Only clone sites you own or have explicit permission to replicate. Respect copyright and trademarks.
Playwright MCP server must be available for browser automation.
- If no browser tools are found, instruct the user:
Playwright MCP is required. Configure it:
codex mcp add playwright npx "@playwright/mcp@latest"
- Required tools:
browser_navigate, browser_snapshot, browser_take_screenshot, browser_evaluate, browser_wait_for. Optional: browser_click, browser_network_requests.
- After Pass 1 completes: Write extraction summary to
.omx/state/{scope}/web-clone-extraction.json containing:
target_url, extracted_at timestamp
screenshot_path (path to target-full.png)
landmark_count (number of nav, main, footer, form elements)
interactive_count (number of detected interactive elements)
extraction_size_kb (approximate size of DOM extraction data)
- After each Pass 4 verification: Append the composite verdict to
.omx/state/{scope}/web-clone-verdicts.json.
- When running within ralph: Also persist the
visual portion of the composite verdict to .omx/state/{scope}/ralph-progress.json for ralph compatibility, mapping visual.score → top-level score and visual.verdict → top-level verdict.
- On completion or failure: Write final status with
completed_at or failed_at timestamp.
- DOM tree: If the serialized JSON exceeds ~30KB, reduce
depth parameter from 8 to 4 and re-extract. Focus on top-level structure.
- Accessibility snapshot: If it exceeds ~20KB, this is normal for complex pages. Summarize key landmarks rather than keeping the full tree.
- Interactive elements: Cap at 50 elements. If more exist, keep only visible ones (
isVisible: true).
- Total extraction context: Aim for under 60KB combined. If exceeded, prioritize: screenshot > accessibility snapshot > interactive elements > DOM styles.
- Image tokens: Full-page screenshots are expensive. Take one baseline in Pass 1 and one comparison in Pass 4. Do not take screenshots between iterations unless debugging a specific region.
Pass 1 — Extract
Capture the target page's structure, styles, interactions, and visual baseline.
- Navigate:
browser_navigate to target_url.
- Wait for render:
browser_wait_for with appropriate condition (network idle or timeout of 5s) to ensure full render including lazy-loaded content.
- Accessibility snapshot:
browser_snapshot — captures the semantic tree (roles, names, values, interactive states). This is your primary structural reference.
- Full-page screenshot:
browser_take_screenshot with fullPage: true — save as reference baseline target-full.png.
- DOM + computed styles:
browser_evaluate with the following script. COPY THIS SCRIPT EXACTLY — do not modify it:(() => {
const walk = (el, depth = 0) => {
if (depth > 8 || !el.tagName) return null;
const cs = window.getComputedStyle(el);
return {
tag: el.tagName.toLowerCase(),
id: el.id || undefined,
classes: [...el.classList].slice(0, 5),
styles: {
display: cs.display, position: cs.position,
width: cs.width, height: cs.height,
padding: cs.padding, margin: cs.margin,
fontSize: cs.fontSize, fontFamily: cs.fontFamily,
fontWeight: cs.fontWeight, lineHeight: cs.lineHeight,
color: cs.color, backgroundColor: cs.backgroundColor,
border: cs.border, borderRadius: cs.borderRadius,
flexDirection: cs.flexDirection, justifyContent: cs.justifyContent,
alignItems: cs.alignItems, gap: cs.gap,
gridTemplateColumns: cs.gridTemplateColumns,
},
text: el.childNodes.length === 1 && el.childNodes[0].nodeType === 3
? el.textContent?.trim().slice(0, 100) : undefined,
children: [...el.children].map(c => walk(c, depth + 1)).filter(Boolean),
};
};
return walk(document.body);
})()
- Interactive elements:
browser_evaluate to catalog all interactable elements. COPY THIS SCRIPT EXACTLY — do not modify it:(() => {
const results = [];
document.querySelectorAll(
'button, a[href], input, select, textarea, [role="button"], ' +
'[onclick], [aria-haspopup], [aria-expanded], details, dialog'
).forEach(el => {
results.push({
tag: el.tagName.toLowerCase(),
type: el.type || el.getAttribute('role') || 'interactive',
text: (el.textContent || '').trim().slice(0, 80),
href: el.href || undefined,
ariaLabel: el.getAttribute('aria-label') || undefined,
isVisible: el.offsetParent !== null,
});
});
return results;
})()
- Network patterns (optional):
browser_network_requests — note XHR/fetch calls for reference. Do not attempt to replicate backends.
Keep all extraction results in working memory for Pass 2.
Pass 2 — Build Plan
Analyze extraction results and decompose into a component plan.
Identify page regions: From DOM tree + accessibility snapshot, identify major sections:
- Navigation bar / header
- Hero / banner section
- Main content area(s)
- Sidebar (if present)
- Footer
- Overlay elements (modals, drawers)
Map components: For each region, define:
- Component name and responsibility
- Key style properties (from computed styles)
- Content summary (headings, text, images)
- Child components if nested
Create interaction map: From interactive elements list:
- Navigation links → anchor tags with
href
- Form elements → proper
<form> with inputs, labels, validation
- Buttons → click handlers (toggle, submit, navigate)
- Dropdowns/modals → show/hide toggle with transitions
- Accordions/tabs → state-based visibility
Extract design tokens: Identify recurring values:
- Color palette (primary, secondary, background, text colors)
- Font stack (families, size scale, weight scale)
- Spacing scale (padding/margin patterns)
- Border radius values
Define file structure:
{output_dir}/
├── index.html (or App.tsx / App.vue)
├── styles/
│ ├── globals.css (reset + tokens)
│ └── components.css (or scoped styles)
├── scripts/
│ └── interactions.js (toggle, modal, dropdown logic)
└── assets/ (placeholder images)
Adapt to tech_stack if specified (React components, Vue SFCs, etc.).
Pass 3 — Generate Clone
Implement the clone from the plan. Work component-by-component.
- Scaffold: Create the directory structure and base files.
- Design tokens first: Implement CSS custom properties or Tailwind config from extracted tokens.
- Layout shell: Build the page-level layout matching the original's flexbox/grid structure.
- Components: Implement each region top-down:
- Match DOM structure from extraction (semantic tags, landmark roles)
- Apply computed styles — prioritize layout properties, then typography, then decorative
- Use actual extracted text content; use placeholder
<img> for external images
- Interactions: Wire up detected behaviors:
- Navigation: working
<a> tags (to # anchors or stubs for v1)
- Forms: proper structure with
<label>, input types, placeholder text
- Toggles: JavaScript for dropdowns, modals, accordions
- Hover/focus states: CSS transitions matching original behavior
- Responsive: If the original uses responsive breakpoints (detectable from media queries in computed styles or from viewport behavior), add basic responsive rules.
Pass 4 — Verify
Compare the clone against the original across three dimensions.
Serve the clone: Start a local server for the generated project:
npx serve {output_dir} -l 3456 --no-clipboard
If npx serve is unavailable, fall back to: python3 -m http.server 3456 -d {output_dir}.
The clone will be accessible at http://localhost:3456.
Visual verification:
- Navigate to the clone with Playwright:
browser_navigate to clone URL.
- Take full-page screenshot of clone.
- Run
$visual-verdict with: reference_images=["target-full.png"], generated_screenshot="clone-full.png", category_hint="web-clone".
- The visual portion of the verdict feeds directly into the composite verdict below.
- Visual pass threshold: score >= 85.
Structural verification: Compare landmark counts:
- Count
<nav>, <main>, <footer>, <form>, <button>, <a> in both original and clone.
- Structure passes when all major landmarks exist (missing landmarks = fail).
Functional spot-check: Test 2–3 detected interactions via Playwright:
- Click a navigation link → verify URL change or scroll behavior
- Toggle a dropdown/modal → verify visibility change
- Interact with a form field → verify it accepts input
- Use
browser_click and browser_snapshot to verify state changes.
Emit composite verdict:
{
"visual": {
"score": 82,
"verdict": "revise",
"category_match": true,
"differences": ["Header spacing tighter than original"],
"suggestions": ["Increase nav gap to 24px"]
},
"functional": {
"tested": 3,
"passed": 2,
"failures": ["Dropdown does not open on click"]
},
"structure": {
"landmark_match": true,
"missing": [],
"extra": []
},
"overall_verdict": "revise",
"priority_fixes": [
"Fix dropdown toggle interaction",
"Increase header nav spacing"
]
}
Pass 5 — Iterate
Fix highest-impact issues and re-verify.
- Prioritize fixes by impact: layout > interactions > spacing > typography > colors.
- Apply targeted edits: Fix only the issues listed in
priority_fixes. Do not refactor working code.
- Re-verify: Repeat Pass 4.
- Loop: Continue until
overall_verdict is pass OR max 5 iterations reached.
- Final report: Summarize what was successfully cloned, any remaining differences, and elements that could not be replicated.
{
"visual": {
"score": 0,
"verdict": "revise",
"category_match": false,
"differences": ["..."],
"suggestions": ["..."],
"reasoning": "short explanation"
},
"functional": {
"tested": 0,
"passed": 0,
"failures": ["..."]
},
"structure": {
"landmark_match": false,
"missing": ["..."],
"extra": ["..."]
},
"overall_verdict": "revise",
"priority_fixes": ["..."]
}
Rules:
visual follows the VisualVerdict shape from $visual-verdict
functional.tested/passed are counts; failures list specific interaction failures
structure.landmark_match is true when all major HTML landmarks (nav, main, footer, forms) are present
overall_verdict: pass when visual.score >= 85 AND functional.failures is empty AND structure.landmark_match is true
priority_fixes: ordered by impact, drives the next iteration
Pass 1: Navigate to HN. Extract: table-based layout, orange (#ff6600) nav bar, story list with links + points + comments, footer. Screenshot saved.
Pass 2: Regions: nav bar (logo + links), story table (30 rows × title + meta), footer. Tokens: orange #ff6600, gray #828282, Verdana font, 10pt base. Interaction map: story links (external), comment links, "more" pagination.
Pass 3: Generate index.html with HN-style table layout, CSS matching extracted colors/fonts, working <a> tags for stories.
Pass 4: Visual score=78 (font size off, spacing between stories too tight). Functional 2/2 (links work). Structure match=true.
Pass 5 iteration 1: Fix font to Verdana 10pt, increase row padding → score=88. Functional 2/2. Structure match. → overall_verdict: pass. Done.
1---2name: web-clone3description: Web Clone deprecated shim4---56# Web Clone deprecated78Hard-deprecated. Do not invoke or route this skill. Use `$visual-ralph` directly for live-URL visual implementation and visual QA workflows.910<Do_Not_Use_When>11- User only has screenshot references without a live URL — use `$visual-verdict` directly12- User wants to modify, redesign, or "improve" the site — use standard implementation flow13- Target requires authentication, payment flows, or backend API parity — out of scope for v114- Multi-page / multi-route deep cloning — v1 handles single-page scope only15</Do_Not_Use_When>1617<Scope_Limits>18**v1 scope**: Single page clone of the provided URL.1920Included:21- Layout structure (header, nav, content areas, sidebar, footer)22- Typography (font families, sizes, weights, line heights)23- Colors, spacing, borders, border-radius24- Core interactions: navigation links, buttons, form elements, dropdowns, modals, toggles25- Responsive hints from the extracted layout (flexbox/grid patterns)2627Excluded:28- Backend API integration or data fetching29- Authentication flows or protected content30- Dynamic/personalized content (user-specific data)31- Multi-page crawling or route graph cloning32- Third-party widget functionality (maps, embeds, chat widgets)33- Image/asset replication (use placeholders for external images)3435**Legal notice**: Only clone sites you own or have explicit permission to replicate. Respect copyright and trademarks.36</Scope_Limits>3738<Prerequisites>39Playwright MCP server must be available for browser automation.40412. If no browser tools are found, instruct the user:42 ```43 Playwright MCP is required. Configure it:44 codex mcp add playwright npx "@playwright/mcp@latest"45 ```463. Required tools: `browser_navigate`, `browser_snapshot`, `browser_take_screenshot`, `browser_evaluate`, `browser_wait_for`. Optional: `browser_click`, `browser_network_requests`.47</Prerequisites>4849<Inputs>50- `target_url` (required): The URL to clone51- `output_dir` (optional, default: current working directory): Where to generate the clone project52- `tech_stack` (optional, inferred from project context): HTML/CSS/JS, React, Vue, Svelte, etc.53</Inputs>5455<Tool_Usage>56- If no browser tools are found, stop immediately and instruct the user to configure Playwright MCP.57- Use `browser_snapshot` (accessibility tree) for structural understanding — it is far more token-efficient than screenshots.58- Use `browser_take_screenshot` only when visual verification is needed (Pass 1 baseline, Pass 4 comparison).59- Use `browser_evaluate` for DOM/style extraction — pass the scripts from this skill EXACTLY as written (do not modify them).60- If running within ralph, use `state_write` / `state_read` for web-clone state persistence between iterations.61- Skip Codex consultation for straightforward extraction; use it only if verification repeatedly fails on the same issue.62</Tool_Usage>6364<State_Management>65Persist extraction and progress data so the pipeline can resume if interrupted.6667- **After Pass 1 completes**: Write extraction summary to `.omx/state/{scope}/web-clone-extraction.json` containing:68 - `target_url`, `extracted_at` timestamp69 - `screenshot_path` (path to `target-full.png`)70 - `landmark_count` (number of nav, main, footer, form elements)71 - `interactive_count` (number of detected interactive elements)72 - `extraction_size_kb` (approximate size of DOM extraction data)73- **After each Pass 4 verification**: Append the composite verdict to `.omx/state/{scope}/web-clone-verdicts.json`.74- **When running within ralph**: Also persist the `visual` portion of the composite verdict to `.omx/state/{scope}/ralph-progress.json` for ralph compatibility, mapping `visual.score` → top-level `score` and `visual.verdict` → top-level `verdict`.75- **On completion or failure**: Write final status with `completed_at` or `failed_at` timestamp.76</State_Management>7778<Context_Budget>79Pass 1 extraction can produce very large data. Apply these limits proactively:8081- **DOM tree**: If the serialized JSON exceeds ~30KB, reduce `depth` parameter from 8 to 4 and re-extract. Focus on top-level structure.82- **Accessibility snapshot**: If it exceeds ~20KB, this is normal for complex pages. Summarize key landmarks rather than keeping the full tree.83- **Interactive elements**: Cap at 50 elements. If more exist, keep only visible ones (`isVisible: true`).84- **Total extraction context**: Aim for under 60KB combined. If exceeded, prioritize: screenshot > accessibility snapshot > interactive elements > DOM styles.85- **Image tokens**: Full-page screenshots are expensive. Take one baseline in Pass 1 and one comparison in Pass 4. Do not take screenshots between iterations unless debugging a specific region.86</Context_Budget>8788<Steps>8990## Pass 1 — Extract9192Capture the target page's structure, styles, interactions, and visual baseline.93941. **Navigate**: `browser_navigate` to `target_url`.952. **Wait for render**: `browser_wait_for` with appropriate condition (network idle or timeout of 5s) to ensure full render including lazy-loaded content.963. **Accessibility snapshot**: `browser_snapshot` — captures the semantic tree (roles, names, values, interactive states). This is your primary structural reference.974. **Full-page screenshot**: `browser_take_screenshot` with `fullPage: true` — save as reference baseline `target-full.png`.985. **DOM + computed styles**: `browser_evaluate` with the following script. **COPY THIS SCRIPT EXACTLY — do not modify it**:99 ```javascript100 (() => {101 const walk = (el, depth = 0) => {102 if (depth > 8 || !el.tagName) return null;103 const cs = window.getComputedStyle(el);104 return {105 tag: el.tagName.toLowerCase(),106 id: el.id || undefined,107 classes: [...el.classList].slice(0, 5),108 styles: {109 display: cs.display, position: cs.position,110 width: cs.width, height: cs.height,111 padding: cs.padding, margin: cs.margin,112 fontSize: cs.fontSize, fontFamily: cs.fontFamily,113 fontWeight: cs.fontWeight, lineHeight: cs.lineHeight,114 color: cs.color, backgroundColor: cs.backgroundColor,115 border: cs.border, borderRadius: cs.borderRadius,116 flexDirection: cs.flexDirection, justifyContent: cs.justifyContent,117 alignItems: cs.alignItems, gap: cs.gap,118 gridTemplateColumns: cs.gridTemplateColumns,119 },120 text: el.childNodes.length === 1 && el.childNodes[0].nodeType === 3121 ? el.textContent?.trim().slice(0, 100) : undefined,122 children: [...el.children].map(c => walk(c, depth + 1)).filter(Boolean),123 };124 };125 return walk(document.body);126 })()127 ```1286. **Interactive elements**: `browser_evaluate` to catalog all interactable elements. **COPY THIS SCRIPT EXACTLY — do not modify it**:129 ```javascript130 (() => {131 const results = [];132 document.querySelectorAll(133 'button, a[href], input, select, textarea, [role="button"], ' +134 '[onclick], [aria-haspopup], [aria-expanded], details, dialog'135 ).forEach(el => {136 results.push({137 tag: el.tagName.toLowerCase(),138 type: el.type || el.getAttribute('role') || 'interactive',139 text: (el.textContent || '').trim().slice(0, 80),140 href: el.href || undefined,141 ariaLabel: el.getAttribute('aria-label') || undefined,142 isVisible: el.offsetParent !== null,143 });144 });145 return results;146 })()147 ```1487. **Network patterns** (optional): `browser_network_requests` — note XHR/fetch calls for reference. Do not attempt to replicate backends.149150Keep all extraction results in working memory for Pass 2.151152## Pass 2 — Build Plan153154Analyze extraction results and decompose into a component plan.1551561. **Identify page regions**: From DOM tree + accessibility snapshot, identify major sections:157 - Navigation bar / header158 - Hero / banner section159 - Main content area(s)160 - Sidebar (if present)161 - Footer162 - Overlay elements (modals, drawers)1631642. **Map components**: For each region, define:165 - Component name and responsibility166 - Key style properties (from computed styles)167 - Content summary (headings, text, images)168 - Child components if nested1691703. **Create interaction map**: From interactive elements list:171 - Navigation links → anchor tags with `href`172 - Form elements → proper `<form>` with inputs, labels, validation173 - Buttons → click handlers (toggle, submit, navigate)174 - Dropdowns/modals → show/hide toggle with transitions175 - Accordions/tabs → state-based visibility1761774. **Extract design tokens**: Identify recurring values:178 - Color palette (primary, secondary, background, text colors)179 - Font stack (families, size scale, weight scale)180 - Spacing scale (padding/margin patterns)181 - Border radius values1821835. **Define file structure**:184 ```185 {output_dir}/186 ├── index.html (or App.tsx / App.vue)187 ├── styles/188 │ ├── globals.css (reset + tokens)189 │ └── components.css (or scoped styles)190 ├── scripts/191 │ └── interactions.js (toggle, modal, dropdown logic)192 └── assets/ (placeholder images)193 ```194 Adapt to `tech_stack` if specified (React components, Vue SFCs, etc.).195196## Pass 3 — Generate Clone197198Implement the clone from the plan. Work component-by-component.1992001. **Scaffold**: Create the directory structure and base files.2012. **Design tokens first**: Implement CSS custom properties or Tailwind config from extracted tokens.2023. **Layout shell**: Build the page-level layout matching the original's flexbox/grid structure.2034. **Components**: Implement each region top-down:204 - Match DOM structure from extraction (semantic tags, landmark roles)205 - Apply computed styles — prioritize layout properties, then typography, then decorative206 - Use actual extracted text content; use placeholder `<img>` for external images2075. **Interactions**: Wire up detected behaviors:208 - Navigation: working `<a>` tags (to `#` anchors or stubs for v1)209 - Forms: proper structure with `<label>`, input types, placeholder text210 - Toggles: JavaScript for dropdowns, modals, accordions211 - Hover/focus states: CSS transitions matching original behavior2126. **Responsive**: If the original uses responsive breakpoints (detectable from media queries in computed styles or from viewport behavior), add basic responsive rules.213214## Pass 4 — Verify215216Compare the clone against the original across three dimensions.2172181. **Serve the clone**: Start a local server for the generated project:219 ```bash220 npx serve {output_dir} -l 3456 --no-clipboard221 ```222 If `npx serve` is unavailable, fall back to: `python3 -m http.server 3456 -d {output_dir}`.223 The clone will be accessible at `http://localhost:3456`.2242. **Visual verification**:225 - Navigate to the clone with Playwright: `browser_navigate` to clone URL.226 - Take full-page screenshot of clone.227 - Run `$visual-verdict` with: `reference_images=["target-full.png"]`, `generated_screenshot="clone-full.png"`, `category_hint="web-clone"`.228 - The visual portion of the verdict feeds directly into the composite verdict below.229 - Visual pass threshold: **score >= 85**.2302313. **Structural verification**: Compare landmark counts:232 - Count `<nav>`, `<main>`, `<footer>`, `<form>`, `<button>`, `<a>` in both original and clone.233 - Structure passes when all major landmarks exist (missing landmarks = fail).2342354. **Functional spot-check**: Test 2–3 detected interactions via Playwright:236 - Click a navigation link → verify URL change or scroll behavior237 - Toggle a dropdown/modal → verify visibility change238 - Interact with a form field → verify it accepts input239 - Use `browser_click` and `browser_snapshot` to verify state changes.2402415. **Emit composite verdict**:242243```json244{245 "visual": {246 "score": 82,247 "verdict": "revise",248 "category_match": true,249 "differences": ["Header spacing tighter than original"],250 "suggestions": ["Increase nav gap to 24px"]251 },252 "functional": {253 "tested": 3,254 "passed": 2,255 "failures": ["Dropdown does not open on click"]256 },257 "structure": {258 "landmark_match": true,259 "missing": [],260 "extra": []261 },262 "overall_verdict": "revise",263 "priority_fixes": [264 "Fix dropdown toggle interaction",265 "Increase header nav spacing"266 ]267}268```269270## Pass 5 — Iterate271272Fix highest-impact issues and re-verify.2732741. **Prioritize fixes** by impact: layout > interactions > spacing > typography > colors.2752. **Apply targeted edits**: Fix only the issues listed in `priority_fixes`. Do not refactor working code.2763. **Re-verify**: Repeat Pass 4.2774. **Loop**: Continue until `overall_verdict` is `pass` OR max **5 iterations** reached.2785. **Final report**: Summarize what was successfully cloned, any remaining differences, and elements that could not be replicated.279280</Steps>281282<Output_Contract>283After each verification pass, emit a **composite web-clone verdict** JSON:284285```json286{287 "visual": {288 "score": 0,289 "verdict": "revise",290 "category_match": false,291 "differences": ["..."],292 "suggestions": ["..."],293 "reasoning": "short explanation"294 },295 "functional": {296 "tested": 0,297 "passed": 0,298 "failures": ["..."]299 },300 "structure": {301 "landmark_match": false,302 "missing": ["..."],303 "extra": ["..."]304 },305 "overall_verdict": "revise",306 "priority_fixes": ["..."]307}308```309310Rules:311- `visual` follows the `VisualVerdict` shape from `$visual-verdict`312- `functional.tested/passed` are counts; `failures` list specific interaction failures313- `structure.landmark_match` is `true` when all major HTML landmarks (nav, main, footer, forms) are present314- `overall_verdict`: `pass` when visual.score >= 85 AND functional.failures is empty AND structure.landmark_match is true315- `priority_fixes`: ordered by impact, drives the next iteration316</Output_Contract>317318<Iteration_Thresholds>319- **Visual pass**: score >= 85320- **Functional pass**: zero failures on tested interactions321- **Structure pass**: all major landmarks present322- **Overall pass**: all three dimensions pass323- **Max iterations**: 5 (report best achieved result if threshold not met)324</Iteration_Thresholds>325326<Error_Handling>327- **Playwright MCP unavailable**: Stop. Instruct user to configure it. Do not attempt to clone without browser tools.328- **Page fails to load**: Report the URL and HTTP status. Suggest the user verify the URL is accessible.329- **browser_evaluate returns empty**: The page may use heavy client-side rendering. Wait longer (`browser_wait_for` with extended timeout) and retry once.330- **Visual score stuck below threshold after 3 iterations**: Report the current state as best-effort. List the unresolved differences for the user.331- **Extraction data too large for context**: Truncate deep DOM branches (depth > 6). Focus on top-level structure and defer nested details to iteration fixes.332</Error_Handling>333334<Example>335**User**: "Clone https://news.ycombinator.com"336337**Pass 1**: Navigate to HN. Extract: table-based layout, orange (#ff6600) nav bar, story list with links + points + comments, footer. Screenshot saved.338339**Pass 2**: Regions: nav bar (logo + links), story table (30 rows × title + meta), footer. Tokens: orange #ff6600, gray #828282, Verdana font, 10pt base. Interaction map: story links (external), comment links, "more" pagination.340341**Pass 3**: Generate index.html with HN-style table layout, CSS matching extracted colors/fonts, working `<a>` tags for stories.342343**Pass 4**: Visual score=78 (font size off, spacing between stories too tight). Functional 2/2 (links work). Structure match=true.344345**Pass 5 iteration 1**: Fix font to Verdana 10pt, increase row padding → score=88. Functional 2/2. Structure match. → `overall_verdict: pass`. Done.346</Example>347348<Final_Checklist>349- [ ] Pass 1 extraction completed and summarized (screenshot + accessibility tree + DOM styles + interactions)350- [ ] Pass 2 component plan created with file structure351- [ ] Pass 3 clone generated and files written to `output_dir`352- [ ] Clone serves locally without errors353- [ ] Pass 4 composite verdict emitted with all three dimensions354- [ ] `overall_verdict` is `pass`, or max 5 iterations reached with best-effort report355- [ ] When in ralph: visual verdict persisted to `ralph-progress.json`356- [ ] Extraction summary persisted to `web-clone-extraction.json`357</Final_Checklist>