with one click
migration-setup
// Phase 2 of 1st-gen to 2nd-gen component migration. Use to create the 2nd-gen file and folder structure, wire up exports, and confirm the build passes before implementation begins.
// Phase 2 of 1st-gen to 2nd-gen component migration. Use to create the 2nd-gen file and folder structure, wire up exports, and confirm the build passes before implementation begins.
Use when creating a per-component migration guide for application developers upgrading from Spectrum 1 Web Components to Spectrum 2 components.
Phase 7 of 1st-gen to 2nd-gen component migration. Use to write JSDoc, Storybook stories, and usage docs so the component is usable and understandable by others.
Phase 5 of 1st-gen to 2nd-gen component migration. Use to migrate CSS to the 2nd-gen structure, apply Spectrum 2 tokens, and ensure stylelint passes.
Sub-task after Phase 6 of 1st-gen to 2nd-gen component migration. Use to verify all migrated files conform to the project style guides, run linters, and surface any guideline gaps as PR comment notes.
Phase 4 of 1st-gen to 2nd-gen component migration. Use to implement WCAG-aligned semantics, ARIA, keyboard support, and focus management, and document accessibility behavior.
Phase 8 of 1st-gen to 2nd-gen component migration. Use to run final checks, verify lint/tests/build/Storybook, update the workstream status table, and open a PR.
| name | migration-setup |
| description | Phase 2 of 1st-gen to 2nd-gen component migration. Use to create the 2nd-gen file and folder structure, wire up exports, and confirm the build passes before implementation begins. |
Phase 2 of the 1st-gen → 2nd-gen component migration. The goal is to create the core and SWC directory structure, stub out the required files, and confirm the component is importable before any implementation work begins.
You are building a foundation, not a feature. Every file you create here is a contract: the right structure now prevents expensive restructuring later. Stub first, verify the build passes, then stop — implementation comes in later phases.
Read the migration plan at CONTRIBUTOR-DOCS/03_project-planning/03_components/[component]/migration-plan.md when available and use it as the baseline for all structural decisions: component naming, split-vs-single-component decisions, expected core/SWC file layout, and — critically — what properties, methods, and mixins belong on the base class vs. the concrete SWC class. If it is missing, stale, or intentionally incomplete, derive those decisions from the best available source material and call out the missing plan as a risk. See also migration-plan-contract.
Migration plan sections override washing-machine defaults. The washing machine workflow describes the typical Phase 2 file structure; a component's migration plan describes the specific architectural intent for that component. When the two conflict — for example, the plan restricts which properties may live on the base class for shared-reuse reasons — the migration plan takes precedence. Common plan sections that carry these overrides:
If the plan's API checklist and an architectural decision section contradict each other, the architectural decision section governs. Update the checklist to reflect the correct split and note the reason.
Before creating any files:
Then follow Phase 2: Setup in the washing machine workflow doc — it covers what to do, what to check, common problems, and the quality gate for this phase.
Key file split (SWC package):
index.ts — class re-export only (export * from './Component.js'). No defineElement, no HTMLElementTagNameMap augmentation.swc-<tag>.ts — side-effect entry point. Contains defineElement('swc-<tag>', Component) and the HTMLElementTagNameMap augmentation. Use 2nd-gen/packages/swc/components/badge/swc-badge.ts as the reference.package.json — must export ./components/<name>/swc-<tag>.js so consumers can import @adobe/spectrum-wc/components/<name>/swc-<tag>.js to register the element without pulling in a class re-export.If the required file layout or naming in code would drift from the migration plan, follow migration-plan-contract.