Phase 0: Setup
Objective
Section titled “Objective”Establish a clean working environment: remove stale canary-refactor artifacts, clone dev-witness stories, set up VRT baselines, and verify ESLint boundary rules.
Corresponds to General Workflow steps 1-3.
Entry Criteria
Section titled “Entry Criteria”This is the first phase — no prior phase artifacts are required.
Verify before starting:
- Working directory is the
ux-prototyperepository root npm installhas been run (node_modules present)- The repository is on a clean branch (no uncommitted changes):
git status
T0.1 — Clean Existing Canary-Refactor Artifacts
Section titled “T0.1 — Clean Existing Canary-Refactor Artifacts”Per Planning Q1 decision: remove existing canary-refactor code and start fresh.
- Delete
ux-prototype/src/canary-refactor/reference/items/(contains staleitem-detail.stories.tsx) - Delete
ux-prototype/src/canary-refactor/components/(contains staleItemDetailPage.tsx,ItemDetailsPanel.tsx,ItemsPage.tsx) - Verify:
npm run lintandnpm run teststill pass after deletion
T0.2 — Clone Dev-Witness Stories
Section titled “T0.2 — Clone Dev-Witness Stories”Per Planning Q2 decision: clone both stories.
- Copy
ux-prototype/src/dev-witness/reference/items/items-grid.stories.tsxtoux-prototype/src/canary-refactor/reference/items/items-grid.stories.tsx - Copy
ux-prototype/src/dev-witness/reference/items/item-detail.stories.tsxtoux-prototype/src/canary-refactor/reference/items/item-detail.stories.tsx - Update Storybook
titlein each clone:Dev Witness/Reference/Items/...toCanary Refactor/Reference/Items/... - Keep all other configuration (args, parameters, play functions, MSW handlers) identical
- Verify:
npm run lint+npm run build:lib+npm run testpass
T0.3 — Set Up VRT Baseline
Section titled “T0.3 — Set Up VRT Baseline”- Add canary-refactor stories to the VRT spec (either extend
tests/vrt/canary-parity.spec.tsor create a new spec file) - Each canary-refactor story should be compared against the corresponding dev-witness story
- Run VRT:
npm run test:vrt— baselines should be captured and tests should pass (stories are identical clones at this point)
T0.4 — Verify ESLint Boundary Rules
Section titled “T0.4 — Verify ESLint Boundary Rules”Per Planning Q4 decision: canary must not import from extras.
- Check
ux-prototype/eslint.config.mjsforno-restricted-importsrules - Verify that canary code (
src/components/canary/**) is blocked from importing extras (src/components/extras/**,src/types/extras/**) - If the rule doesn’t exist, add it following the existing stable-to-canary pattern
- Verify:
npm run lintpasses
Acceptance Criteria
Section titled “Acceptance Criteria”- No files exist under
canary-refactor/components/orcanary-refactor/reference/items/from prior work - Two cloned stories exist under
canary-refactor/reference/items/withCanary Refactor/title prefix - VRT baselines captured for both canary-refactor stories
- VRT tests pass (stories are identical to dev-witness)
- ESLint rule confirms canary cannot import from extras
npm run lint+npm run build:lib+npm run testpass
Copyright: © Arda Systems 2025-2026, All rights reserved