The pipeline
What each stage of a capture does, which engine runs it, and how the build is verified before it ships.
Two engines
Capture runs on one of two engines, chosen automatically and overridable with --engine.
| Engine | Use | Trade-off |
|---|---|---|
| static | Raw HTTP. Server-rendered and static sites. | Far faster, and scores higher structurally. Cannot see anything painted by JavaScript. |
| playwright | App shells, anti-bot CDNs, pages needing a session. | Slower, but captures the DOM after it settles, and can log in and keep cookies. |
Capture
The capture stage crawls the origin and resolves everything the browser would have loaded:
- Assets — images, CSS, JavaScript, webfonts, video, downloaded and rewritten to local paths.
- CSS recursion — stylesheets are parsed for further references, including imports and fonts declared inside them.
- Sprites — symbols referenced by a use element are followed to the sprite file and copied.
- Lazy images — deferred sources are promoted to real ones so images render without JavaScript.
- Interactions — visible triggers are clicked and the resulting DOM change is recorded as a diff.
- Optimisation — large images are re-encoded to WebP, duplicate files are collapsed, HTML and CSS are minified.
Asset resolution is the whole game
Most cloner output fails on references, not on layout. Four classes of reference that commonly break, and how they are handled:
| Reference | Handling |
|---|---|
| Same-document fragments, as in a clip path pointing at an inline shape | Left alone. Resolving one against the page URL downloads the page as an image and kills the icon. |
| Escaped ampersands in image-optimiser URLs | Decoded before fetching, so the parameters survive. Fetching the raw text asks for a parameter that does not exist and returns an error. |
| Stylesheet-relative paths that climb a directory | Resolved against the stylesheet, not the site root, then copied. |
| Backgrounds declared in markup rather than a stylesheet | Scanned from inline styles and style blocks as well as attributes. |
Refine
Refine turns the capture into a project. Sections are split into components, named from their content rather than numbered, and every text node becomes a slot with a stable identifier. Stylesheets are copied byte for byte so the visual result does not drift.
Wire
Wire creates the schema, seeds the slots, builds the admin panel and turns on the modules you asked for. Passing a shared database registers the clone as a tenant instead of creating a new project.
Verify
Verification loads every route in a headless browser and counts failed requests, then scores the build. A readiness score is not a substitute for that count: a build can score well and still be missing a font family, because a warning is easy to scroll past.
Deploy
Deploy builds for production, pushes, and points the alias at the new deployment. Re-alias explicitly if a deploy errors — a failed deploy can leave the alias stranded on the previous build, which makes a broken clone look fine.