Storefront → Templates → Migration validation
Parity overview
A CLI that captures a live storefront into an agent-ready bundle and validates a migrated site against the original.
@decocms/parity is a Playwright-based CLI with two jobs in a migration:
- Capture — point it at a live storefront URL and it extracts the theme, fonts, logo/icons, per-component HTML (+ suggested Tailwind + e2e selectors) and, for VTEX IO, the real block tree and CMS content, into a token-lean, agent-ready bundle.
- Validate — give it two URLs (
prod= source of truth,cand= the migrated site) and it reports UI, functional, SEO, performance, console, network and cache regressions with an LLM-ranked report.
Capture works whether or not you have the source code — it reads the rendered page. It's the fastest way to start a migration from a store you only have a URL for.
Install
# Global (auto-installs Playwright Chromium on first run)
npm i -g @decocms/parity
# Or run without installing
npx @decocms/parity run --prod https://old.com --cand https://new.dev --preset smoke --openSet ANTHROPIC_API_KEY (or OPENROUTER_API_KEY) to enable the LLM passes (issue ranking, visual semantic diff, selector discovery). Everything degrades gracefully without a key — see Configuration.
The command families
| Family | Commands | Use it to… |
|---|---|---|
| Validate (prod × cand) | run, journey, pr, compare | Compare a migrated site to the original and gate a PR. |
| Pixel-perfect | fix, section | Diff one section (screenshots + heatmap + computed styles) into an LLM-ready bundle. |
| Performance | vitals, cache | Compare Web Vitals / cache coverage across many pages. |
| Single-site | e2e, audit | Validate ONE site end-to-end (no baseline). |
| Capture | migrate, extract | Extract a store into a migration/agent bundle. |
| Inspect | css-trace, console, html, check | Sub-10s single-purpose probes. |
| Manage | serve, report, baseline, list, prompt, explain, learned | Work with saved runs + artifacts. |
Which command?
- Two URLs, "did anything regress?" →
parity run(--preset smokefirst, then--preset full). - One section looks off →
parity fix(pixel diff + heatmap + prompt). - Only care about SEO / vitals / cache / DOM →
parity run --only seo(orvitals/cache/html) — see Focused runs. - One live URL, "does it work?" →
parity e2e. - Rebuild a store from a URL →
parity migrate. - In CI →
parity pr/parity journey.
See also
parity run— the flagship validatorparity migrate— capture a store- Configuration · Checks reference
@decocms/parityon GitHub