From 893da2e3324f044430eeb5736b05c5f323d25626 Mon Sep 17 00:00:00 2001 From: Samraaj Bath Date: Tue, 30 Jun 2026 10:48:40 -0700 Subject: [PATCH] Remove opencode sidecar tooling --- .opencode/.gitignore | 3 - .opencode/agents/clone-advanced.md | 141 --- .opencode/agents/clone-analyze.md | 164 ---- .opencode/agents/clone-capture.md | 122 --- .opencode/agents/clone-generate.md | 147 --- .opencode/agents/clone-orchestrator.md | 237 ----- .opencode/agents/clone-validate.md | 199 ---- .opencode/fixtures/test-site/README.md | 69 -- .opencode/fixtures/test-site/decoration.svg | 5 - .opencode/fixtures/test-site/hero-bg.svg | 20 - .opencode/fixtures/test-site/index.html | 132 --- .opencode/fixtures/test-site/reveal.js | 27 - .opencode/fixtures/test-site/styles.css | 265 ----- .opencode/package.json | 5 - .opencode/scripts/capture.py | 913 ------------------ .opencode/scripts/diff.py | 107 -- .opencode/scripts/dom-diff.py | 342 ------- .opencode/scripts/download-assets.py | 102 -- .opencode/scripts/dump-rendered.py | 118 --- .opencode/scripts/extract-fonts.py | 135 --- .opencode/scripts/init-hooks/bootstrap.js | 25 - .../scripts/init-hooks/computed-styles.js | 193 ---- .opencode/scripts/init-hooks/css-rules.js | 121 --- .opencode/scripts/init-hooks/css-vars.js | 51 - .opencode/scripts/init-hooks/framer-dump.js | 107 -- .opencode/scripts/init-hooks/gsap-dump.js | 103 -- .opencode/scripts/init-hooks/lottie-dump.js | 47 - .opencode/scripts/init-hooks/section-scan.js | 147 --- .opencode/scripts/init-hooks/shaders.js | 97 -- .opencode/scripts/init-hooks/threejs-dump.js | 130 --- .opencode/scripts/requirements.txt | 7 - .opencode/skills/agent-browser/SKILL.md | 632 ------------ .../skills/animation-translation/SKILL.md | 178 ---- .opencode/skills/asset-pipeline/SKILL.md | 169 ---- .opencode/skills/clone-staging/SKILL.md | 113 --- .opencode/skills/css-to-tailwind/SKILL.md | 128 --- .opencode/skills/dom-to-jsx/SKILL.md | 140 --- .opencode/skills/site-manifest/SKILL.md | 177 ---- .opencode/skills/validation-loop/SKILL.md | 161 --- .opencode/tools/_python.ts | 8 - .opencode/tools/agent-browser-shot.ts | 94 -- .opencode/tools/capture.ts | 97 -- .opencode/tools/dev-server.ts | 63 -- .opencode/tools/dom-diff.ts | 58 -- .opencode/tools/download-assets.ts | 47 - .opencode/tools/dump-rendered.ts | 58 -- .opencode/tools/screenshot-diff.ts | 65 -- opencode.json | 22 - 48 files changed, 6491 deletions(-) delete mode 100644 .opencode/.gitignore delete mode 100644 .opencode/agents/clone-advanced.md delete mode 100644 .opencode/agents/clone-analyze.md delete mode 100644 .opencode/agents/clone-capture.md delete mode 100644 .opencode/agents/clone-generate.md delete mode 100644 .opencode/agents/clone-orchestrator.md delete mode 100644 .opencode/agents/clone-validate.md delete mode 100644 .opencode/fixtures/test-site/README.md delete mode 100644 .opencode/fixtures/test-site/decoration.svg delete mode 100644 .opencode/fixtures/test-site/hero-bg.svg delete mode 100644 .opencode/fixtures/test-site/index.html delete mode 100644 .opencode/fixtures/test-site/reveal.js delete mode 100644 .opencode/fixtures/test-site/styles.css delete mode 100644 .opencode/package.json delete mode 100755 .opencode/scripts/capture.py delete mode 100755 .opencode/scripts/diff.py delete mode 100644 .opencode/scripts/dom-diff.py delete mode 100755 .opencode/scripts/download-assets.py delete mode 100644 .opencode/scripts/dump-rendered.py delete mode 100755 .opencode/scripts/extract-fonts.py delete mode 100644 .opencode/scripts/init-hooks/bootstrap.js delete mode 100644 .opencode/scripts/init-hooks/computed-styles.js delete mode 100644 .opencode/scripts/init-hooks/css-rules.js delete mode 100644 .opencode/scripts/init-hooks/css-vars.js delete mode 100644 .opencode/scripts/init-hooks/framer-dump.js delete mode 100644 .opencode/scripts/init-hooks/gsap-dump.js delete mode 100644 .opencode/scripts/init-hooks/lottie-dump.js delete mode 100644 .opencode/scripts/init-hooks/section-scan.js delete mode 100644 .opencode/scripts/init-hooks/shaders.js delete mode 100644 .opencode/scripts/init-hooks/threejs-dump.js delete mode 100644 .opencode/scripts/requirements.txt delete mode 100644 .opencode/skills/agent-browser/SKILL.md delete mode 100644 .opencode/skills/animation-translation/SKILL.md delete mode 100644 .opencode/skills/asset-pipeline/SKILL.md delete mode 100644 .opencode/skills/clone-staging/SKILL.md delete mode 100644 .opencode/skills/css-to-tailwind/SKILL.md delete mode 100644 .opencode/skills/dom-to-jsx/SKILL.md delete mode 100644 .opencode/skills/site-manifest/SKILL.md delete mode 100644 .opencode/skills/validation-loop/SKILL.md delete mode 100644 .opencode/tools/_python.ts delete mode 100644 .opencode/tools/agent-browser-shot.ts delete mode 100644 .opencode/tools/capture.ts delete mode 100644 .opencode/tools/dev-server.ts delete mode 100644 .opencode/tools/dom-diff.ts delete mode 100644 .opencode/tools/download-assets.ts delete mode 100644 .opencode/tools/dump-rendered.ts delete mode 100644 .opencode/tools/screenshot-diff.ts delete mode 100644 opencode.json diff --git a/.opencode/.gitignore b/.opencode/.gitignore deleted file mode 100644 index 59df0c0..0000000 --- a/.opencode/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -.clone-workspace -scripts/.venv diff --git a/.opencode/agents/clone-advanced.md b/.opencode/agents/clone-advanced.md deleted file mode 100644 index 9460070..0000000 --- a/.opencode/agents/clone-advanced.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -description: Stage 4 only. Reconstructs Three.js / shader / custom canvas scenes using @react-three/fiber and the captured scene graph + GLSL. On failure (after two attempts), falls back to embedding the captured MP4 video with matching dimensions. Best-effort — fallbacks are a valid result, not a failure. -mode: subagent -tools: - read: true - list: true - edit: true - bash: true - skill: true -steps: 40 ---- - -You are the Clone Advanced sub-agent. - -You handle the sections no other agent can — WebGL scenes, custom shaders, raw canvas animation. You try twice to reconstruct cleanly. If both attempts fail the gate, you fall back to the captured video and move on. - -## Inputs - -```json -{ - "manifest_path": "/manifest.json", - "section_id": "hero-3d", - "capture_dir": "/capture", - "workspace_dir": "", - "attempt": 1 | 2 | "fallback" -} -``` - -Project root is always cwd. Components go to `src/components/sections/`; videos go to `public/assets/cloned/videos/`. - -## Flow - -### Attempt 1 & 2: Reconstruct - -1. Load the scene graph dump from `/threejs/.json`. Typical shape: - - ```json - { - "renderer": { "type": "WebGLRenderer", "size": [1920, 800] }, - "camera": { "type": "PerspectiveCamera", "fov": 50, "position": [0,0,5], ... }, - "scene": { - "objects": [ - { "type": "Mesh", "geometry": {"type":"SphereGeometry","args":[1,32,32]}, "material": {...}, "position": [...], ... } - ], - "lights": [...] - } - } - ``` - -2. Load GLSL from `/shaders/.json` (vertex + fragment source per program). - -3. Translate to `@react-three/fiber` JSX in a Client Component at `src/components/sections/.tsx`. Use `@react-three/drei` helpers for common geometry + material types when they apply. - -4. For custom shaders, use `` with the extracted vertex + fragment source and the captured uniforms. - -5. Wrap in `` with the captured size + DPR. Hide the `` until mounted on client to avoid hydration mismatch. - -6. Import into `src/app/page.tsx` at the correct order. - -### Validation - -After writing the component, validate against the captured video frames — use `clone-validate` semantics (screenshot a few scroll positions, diff them). The gate is `diff_pct < 15%` — looser than other stages because Three.js reconstructions are inherently approximate. - -### Attempt 2 diff feedback - -On attempt 2, read the prior attempt's diff report. Common failure modes and fixes: - -- Colors off → check tone mapping (`gl.toneMapping = ACESFilmicToneMapping`), color space (`gl.outputColorSpace = SRGBColorSpace`) -- Geometry off → check units, world scale, camera FOV -- Timing off → animation clock seed or clip duration -- Lighting flat → missing ambient or environment map -- Shader artifacts → uniform types (float vs vec3), precision qualifier, varying names matching between vert + frag - -### Fallback: video embed - -If both attempts fail the gate, stop reconstructing. Check for a captured MP4 at `/video/.mp4`. - -Copy it to `public/assets/cloned/videos/.mp4` and write a component: - -```tsx -export default function HeroScene() { - return ( -
/' }}> -
- ); -} -``` - -If there is no captured video either, emit a transparent placeholder of the captured bounding box and flag the section to the orchestrator. Do not leave it broken. - -## Return - -On reconstruction success: - -```json -{ - "status": "success", - "mode": "reconstructed", - "section_id": "...", - "files_written": ["src/components/sections/HeroScene.tsx"] -} -``` - -On fallback: - -```json -{ - "status": "success", - "mode": "video_fallback", - "section_id": "...", - "files_written": ["src/components/sections/HeroScene.tsx", "public/assets/cloned/videos/.mp4"], - "notes": "Reconstruction attempted twice; diff % > 15% gate" -} -``` - -On total failure (no video to fall back to): - -```json -{ - "status": "skipped", - "mode": "placeholder", - "section_id": "...", - "notes": "No viable reconstruction or video capture" -} -``` - -## Rules - -- Two attempts, then fallback. Do not loop forever on WebGL. -- Never ship a broken scene. If the reconstruction looks wrong, fall back to video. -- Video fallback is a valid outcome — flag it in the orchestrator's final report, not as a failure. -- Do not touch other sections. Only write the files for this one section. diff --git a/.opencode/agents/clone-analyze.md b/.opencode/agents/clone-analyze.md deleted file mode 100644 index c361fb5..0000000 --- a/.opencode/agents/clone-analyze.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -description: Reads a capture bundle and produces manifest.json — the blueprint the generate agent reads to build the clone. Extracts design tokens, decomposes the page into sections with bounding boxes, identifies repeated component candidates, detects animation libraries, and classifies each section by the maximum stage required (pure CSS vs needs Framer vs needs WebGL). -mode: subagent -tools: - read: true - list: true - grep: true - bash: true - skill: true - edit: true -steps: 30 ---- - -You are the Clone Analyze sub-agent. - -You turn a raw capture bundle into a clean, machine-readable manifest that the generate agent can consume section-by-section. - -## Inputs - -- `capture_dir` — e.g. `.clone-workspace/-/capture` -- `workspace_dir` — e.g. `.clone-workspace/-` (manifest.json goes here) -- `source_url` — original URL - -## Read the spec - -Load `skills/site-manifest/SKILL.md` — it defines the exact schema for `manifest.json`. Do not drift from it. Downstream agents depend on the shape being stable. - -## Flow - -### 1. Read the capture - -- `meta.json` — high-level index (viewports, asset list, detected libs, vh_relative_count, asset_sources) -- `dom//.json` — DOM + computed styles per scroll step (richer walker, filters per-tag defaults, includes pseudo-elements) -- `dom-alt/1280-1080/step-00.json` — DOM at canonical width but alt height (used by capture to derive vh-flags; you don't usually need to read this directly) -- `screenshots//.png` — per-scroll-step viewport screenshots -- `section-shots//section-NN.png` — pre-cropped per-section screenshots; map these to manifest sections by index when you produce `screenshot_paths` -- `sections/.json` — `__CLONE_LIST_SECTIONS__` candidates with bbox + selector. Use these as scaffolding for section decomposition; the smarter scroll loop already used them so each candidate has a clean DOM dump -- `css-vars/*.json` — `:root` custom properties -- `css-rules/*.json` — every same-origin CSS rule + url() asset refs. Use this to recover source intent (`min-height: 100vh`, `width: 100%`, `aspect-ratio: 16/9`) that resolved computed styles erase -- `fonts/*.json` — `@font-face` declarations + resolved URLs -- `/vh-flags.json` (next to manifest.json) — pre-computed vh-relative element list. Cross-reference against your sections to populate `section.vh_relative` + `section.vh_value` - -Read the 1280px DOM first — that is the canonical desktop layout. Skim `sections/1280.json` next to anchor your section list. - -### 2. Extract design tokens - -Walk the computed-styles dump to derive a token set: - -- **Colors**: histogram all color values used (background, color, border, fill, stroke). Promote any value used 3+ times to a semantic name (`bg-primary`, `text-primary`, `accent-1`, ...). Also copy every `--*` custom property from `:root`. -- **Typography**: every `font-family` + `font-size` + `font-weight` + `line-height` + `letter-spacing` combination used on text nodes. Cluster into a type scale. -- **Spacing**: histogram of margin + padding + gap values. Identify the implicit scale (4/8/12/16... or whatever the site actually uses). -- **Radii**: `border-radius` values used. -- **Shadows**: `box-shadow` + `filter: drop-shadow()` values. -- **Breakpoints**: inspect the CSS for `@media` queries; the min-widths used are the breakpoints. - -### 3. Decompose into sections - -A "section" is a visually and semantically coherent top-level block of the page. Typical shape: nav, hero, logo bar, feature grid, testimonials, pricing, CTA banner, footer. - -For each section: - -- `id` — stable slug (`hero`, `feature-grid`, `testimonials-0`, ...) -- `name` — human-readable name -- `dom_path` — relative path to the captured DOM fragment -- `screenshot_paths` — per viewport, prefer `section-shots//section-NN.png` when the candidate index matches; else closest scroll step -- `section_anchor` — CSS selector for the section root (`#id` or `.class`). The validate agent passes this to `dom-diff --root-selector` -- `bounding_box` — `{x, y, width, height}` at 1280×720 capture viewport -- `vh_relative` — true if `vh-flags.json` flags this section's height as viewport-derived -- `vh_value` — implied vh percentage (e.g. 88 for ~88vh) when vh_relative is true -- `full_width` — true when the section spans the full viewport width AND the source CSS suggests full-bleed (use `w-full` not literal px) -- `max_stage_required` — see classification below - -### 4. Classify each section by max_stage_required - -| Content | max_stage_required | -| ---------------------------------------------------------------------------- | ------------------ | -| Static HTML + CSS, no transitions | 1 | -| CSS gradients, filters, keyframes, hover/focus | 2 | -| IntersectionObserver reveals, scroll-linked animations, Framer, Lottie, GSAP | 3 | -| Three.js / custom WebGL / raw canvas animation | 4 | - -Be conservative — it is better to defer a stage than to pull a section too far forward. - -If a section is mostly static but has one Lottie icon, mark `max_stage_required: 3` and note the Lottie in `detected_libs`. The generate agent will implement the static part in stages 1-2 and only wire up the Lottie in stage 3. - -### 5. Identify repeated patterns - -Within and across sections, look for DOM structures that repeat 3+ times with similar shape — feature cards, testimonial cards, logo tiles, nav items. For each, propose: - -```json -{ - "selector": "...", - "count": 6, - "candidate_component": { - "name": "FeatureCard", - "props": ["title", "description", "icon"] - } -} -``` - -Attach to the section where the pattern lives. If the pattern spans sections, attach it to the first. - -### 6. Detect animation libraries - -From the capture hook dumps: - -- `gsap/` non-empty → add `gsap` to `detected_libs` -- `framer/` non-empty → add `framer-motion` -- `lottie/` non-empty → add `lottie-react` -- `threejs/` non-empty → add `three` -- `shaders/` non-empty → flag sections containing the shader's canvas as stage 4 - -### 7. Flag third-party widgets - -Scan the HAR + DOM for known widget signatures: - -- Intercom: `widget.intercom.io`, `
` -- Drift: `js.driftt.com`, `