-
Notifications
You must be signed in to change notification settings - Fork 250
feat(.ai): add consumer migration skill #6145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
caseyisonit
merged 34 commits into
main
from
marissahuysentruyt/feat-consumer-migration-skill
Apr 21, 2026
Merged
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
c856887
feat(.ai): .ai/ dir for tool-agnostic support
marissahuysentruyt 60dee75
refactor(.ai): convert accessibility-migration-analysis from rule to …
marissahuysentruyt ad25fb7
docs(.ai): updates readme with .ai references and new skills
marissahuysentruyt e1f184a
chore(.cursor): remove files relocated to .ai/
marissahuysentruyt 0395c95
feat(.ai): adds .cursor symlinks
marissahuysentruyt d63c149
feat(.ai): add .claude symlinks
marissahuysentruyt 03fc71c
fix(.ai): updates path references in rules and scripts to .ai
marissahuysentruyt 5aee790
feat: adds new directories to gitignore
marissahuysentruyt 35a8e58
feat: repo level AGENTS.md
marissahuysentruyt ee07e57
docs(.ai): tweaks to readme language
marissahuysentruyt 78b3dc8
docs(.ai): overview and reusable prompts
marissahuysentruyt d9b6b08
docs(.ai): fix cursor reference in .ai/rule
marissahuysentruyt 3d87dbe
fix(.ai): cursor skills symlink
marissahuysentruyt bcc6554
feat(.ai): adds missing frontmatter to storybook rules
marissahuysentruyt 373dc21
fix(.ai): contributor docs nav scripts stay out of .ai
marissahuysentruyt 095103b
fix(.ai): handoff references .ai instead of .cursor
marissahuysentruyt 15b52b3
docs(.ai): clarify symlink usage in readme
marissahuysentruyt 5419ec0
fix(.ai): missing instructions in a11y migration skill
marissahuysentruyt 117b2a4
docs(.ai): update readme with content from agnostic overview file
marissahuysentruyt accb70a
feat(.ai): consumer migration skill
marissahuysentruyt c648fbf
feat(badge): adds consumer migration guide docs
marissahuysentruyt 268ac5a
chore: merge main
caseyisonit 8832fd0
chore: linting fixes in rfc
caseyisonit 8447de3
Merge branch 'main' into marissahuysentruyt/feat-consumer-migration-s…
caseyisonit fe54463
chore: moved the guide to component and render in storybook
caseyisonit 240ae36
Merge branch 'marissahuysentruyt/feat-consumer-migration-skill' of ht…
caseyisonit f38f6b6
chore: simplify output
caseyisonit f716043
chore: little more cleanup
caseyisonit e3e44e5
chore: cssprops in table with constraint notes
caseyisonit 6042b02
chore: no mo s2
caseyisonit 904a9fb
Apply suggestion from @cdransf
caseyisonit 231ca1e
chore: example fix
caseyisonit 412605e
Merge branch 'main' into marissahuysentruyt/feat-consumer-migration-s…
caseyisonit 46dc5ce
Merge branch 'main' into marissahuysentruyt/feat-consumer-migration-s…
caseyisonit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| name: consumer-migration-guide | ||
| description: Use when creating a per-component migration guide for application developers upgrading from 1st-gen Spectrum Web Components to 2nd-gen components. | ||
| globs: CONTRIBUTOR-DOCS/**/consumer-migration-guide.md | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # Component migration: consumer guide | ||
|
|
||
| Create per-component migration guidance for application developers upgrading app code from 1st-gen Spectrum Web Components to 2nd-gen components. The output should be practical and consumer-facing: what changed, what to update, how to test it, and how to roll it out safely. | ||
|
|
||
| ## When to use this skill | ||
|
|
||
| - The user asks for a migration guide, upgrade guide, or consumer-facing migration doc for one or more components | ||
| - You are documenting what application developers need to change when replacing a 1st-gen component with its 2nd-gen equivalent | ||
| - The guide needs rollout advice in addition to code updates, such as styling, accessibility, testing, and fallback considerations | ||
|
|
||
| ## How to invoke | ||
|
|
||
| - Say "create a consumer migration guide for [component]" | ||
| - Or say "write an upgrade guide for [component]" or "document how consumers migrate [component] from 1st-gen to 2nd-gen" | ||
| - If the request is about maintainer-facing implementation analysis, use the migration-analysis skills instead | ||
|
|
||
| ## Quick reference | ||
|
|
||
| ### Output | ||
|
|
||
| - **One markdown file per component** at: | ||
| `CONTRIBUTOR-DOCS/03_project-planning/03_components/[component-name]/consumer-migration-guide.md` | ||
| - **Pairing:** Link to `./rendering-and-styling-migration-analysis.md` and `./accessibility-migration-analysis.md` when those docs exist and help the reader | ||
| - **Nav:** After adding the file or changing `##` / `###` headings, run `node update-nav.js` from `CONTRIBUTOR-DOCS/01_contributor-guides/07_authoring-contributor-docs`. Register the doc in `03_components/README.md` when introducing a new component folder. | ||
|
|
||
| ### Required source inputs | ||
|
|
||
| Verify claims against the real implementation and docs before writing: | ||
|
|
||
| - **1st-gen docs and source:** `1st-gen/packages/[component-name]/README.md`, public element files such as `sp-*.ts`, stories, and tests when needed | ||
| - **2nd-gen docs and source:** `2nd-gen/packages/swc/components/[component-name]/src/`, stories, tests, and any package README or docs that describe the public API | ||
| - **Related migration docs:** the component's `rendering-and-styling-migration-analysis.md` and `accessibility-migration-analysis.md` when present | ||
|
|
||
| ### Important | ||
|
|
||
| - Write for **application developers upgrading their code**, not only for component maintainers | ||
| - Prefer **before/after examples**, explicit upgrade actions, and rollout guidance over implementation detail | ||
| - Ask clarifying questions for uncertain mappings instead of guessing | ||
|
|
||
| ## Full instructions | ||
|
|
||
| For the exact document structure, required sections, source-verification expectations, writing rules, and checklist format, read: | ||
|
|
||
| **.ai/skills/consumer-migration-guide/references/consumer-migration-guide-prompt.md** |
227 changes: 227 additions & 0 deletions
227
.ai/skills/consumer-migration-guide/references/consumer-migration-guide-prompt.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,227 @@ | ||
| [Consumer migration guide skill](../SKILL.md) / Full prompt | ||
|
|
||
| # Spectrum consumer migration guide prompt | ||
|
|
||
| For the **[COMPONENT_NAME]** component(s), create one consumer-facing migration guide per component at `CONTRIBUTOR-DOCS/03_project-planning/03_components/[component-name]/consumer-migration-guide.md`. | ||
|
|
||
| These guides are for **application developers upgrading their code** from 1st-gen Spectrum Web Components to 2nd-gen components. Internal maintainers may also use them, but the primary question every section should answer is: | ||
|
|
||
| **"What do I need to change in my product code, styling, tests, and rollout plan?"** | ||
|
|
||
| ## Documentation goal | ||
|
|
||
| The guide should help consumers: | ||
|
|
||
| 1. Identify the 1st-gen component they are replacing | ||
| 2. Understand the 2nd-gen replacement and any important conceptual shifts | ||
| 3. Update markup, attributes, properties, slots, events, and imports | ||
| 4. Adjust styling and customization patterns that changed in 2nd-gen | ||
| 5. Validate accessibility and behavior changes in their application | ||
| 6. Roll out the migration safely with testing and fallback guidance | ||
|
|
||
| Do not write this as an internal implementation roadmap. Keep the language practical, direct, and upgrade-oriented. | ||
|
|
||
| ## Source verification requirements | ||
|
|
||
| Before writing, verify the component against the real repo sources that apply: | ||
|
|
||
| - **1st-gen component docs and public API** | ||
| - `1st-gen/packages/[component-name]/README.md` | ||
| - public custom element entry points such as `sp-*.ts` | ||
| - stories or tests when needed to confirm public behavior | ||
| - **2nd-gen component docs and public API** | ||
| - `2nd-gen/packages/swc/components/[component-name]/src/` | ||
| - stories and tests when needed to confirm public behavior | ||
| - **Migration analysis documents** | ||
| - `./rendering-and-styling-migration-analysis.md` | ||
| - `./accessibility-migration-analysis.md` | ||
|
|
||
| If a claim is not confirmed by source, docs, or related migration analysis, do not present it as fact. Either omit it or call out the uncertainty explicitly. | ||
|
|
||
| ## File and heading format | ||
|
|
||
| - Create a level 1 heading in this format: | ||
|
|
||
| `# [Component name] consumer migration guide` | ||
|
|
||
| - Use sentence case for headings | ||
| - Separate major sections with `---` where the surrounding contributor docs use that pattern | ||
| - Prefer short paragraphs, bullets, tables, and code examples that scan well | ||
|
|
||
| ## Required section order | ||
|
|
||
| Use this **H2** order: | ||
|
|
||
| 1. `## Overview` | ||
| 2. `## Before you migrate` | ||
| 3. `## What changed` | ||
| 4. `## Update your code` | ||
| 5. `## Styling and customization changes` | ||
| 6. `## Accessibility and behavior changes` | ||
| 7. `## Testing and rollout guidance` | ||
| 8. `## Migration checklist` | ||
| 9. `## References` | ||
|
|
||
| Do not skip sections that apply. If a section truly has no component-specific content, say so briefly rather than silently omitting it. | ||
|
|
||
| ## Section requirements | ||
|
|
||
| ### 1. Overview | ||
|
|
||
| Start with a short paragraph that names: | ||
|
|
||
| - the 1st-gen component | ||
| - the 2nd-gen replacement | ||
| - the purpose of the guide | ||
|
|
||
| Use these **`###` subheadings** when they fit: | ||
|
|
||
| - `### Also read` | ||
| - Link to `./rendering-and-styling-migration-analysis.md` | ||
| - Link to `./accessibility-migration-analysis.md` when present | ||
| - `### Who this guide is for` | ||
| - State that it is for application developers upgrading product code | ||
| - `### Migration in one sentence` | ||
| - Give a concise summary of the main shift, for example API rename, markup change, styling model change, or behavior change | ||
|
|
||
| ### 2. Before you migrate | ||
|
|
||
| Prepare the consumer before they start editing code. | ||
|
|
||
| Use these **`###` subheadings**: | ||
|
|
||
| - `### Confirm the replacement component` | ||
| - State the target 2nd-gen component and note if there is not a one-to-one mapping | ||
| - `### Inventory your current usage` | ||
| - Tell readers what to search for in their codebase: tag names, attributes, slot usage, CSS selectors, tests, and any wrappers | ||
| - `### Plan the migration strategy` | ||
| - Call out whether migration is usually straightforward, staged, or likely to need wrapper components, feature flags, or coordinated visual QA | ||
|
|
||
| ### 3. What changed | ||
|
|
||
| Summarize changes in a **table** with these columns: | ||
|
|
||
| `Area | What changed | What consumers need to do` | ||
|
|
||
| Cover the areas that apply: | ||
|
|
||
| - element or import name | ||
| - markup structure | ||
| - attributes and properties | ||
| - slots or content model | ||
| - events | ||
| - styling hooks, classes, or CSS custom properties | ||
| - accessibility semantics | ||
| - test assumptions | ||
|
|
||
| This section is the executive summary. Keep it tight and actionable. | ||
|
|
||
| ### 4. Update your code | ||
|
|
||
| This is the main consumer migration section. | ||
|
|
||
| Use these **`###` subheadings** in order when they apply: | ||
|
|
||
| - `### Replace the component in markup` | ||
| - `### Update attributes, properties, and events` | ||
| - `### Update slots and content structure` | ||
| - `### Before and after examples` | ||
|
|
||
| Requirements: | ||
|
|
||
| - Use concrete before/after code snippets | ||
| - Prefer real tag names and realistic usage patterns from the repo | ||
| - If multiple common migration patterns exist, show more than one example | ||
| - If something from 1st-gen has no 2nd-gen equivalent, say that plainly and give the recommended replacement or workaround | ||
|
|
||
| ### 5. Styling and customization changes | ||
|
|
||
| Explain how consumers need to update app-level styling or customization. | ||
|
|
||
| Use these **`###` subheadings** when they apply: | ||
|
|
||
| - `### CSS classes and DOM assumptions` | ||
| - `### CSS custom properties, tokens, and supported theming hooks` | ||
| - `### Unsupported customization patterns` | ||
|
|
||
| Requirements: | ||
|
|
||
| - Call out when 1st-gen consumers relied on internal Shadow DOM structure, classes, or selectors that should no longer be targeted | ||
| - Explain any move from ad hoc styling to supported tokens, component APIs, or documented hooks | ||
| - If styling customization is intentionally more constrained in 2nd-gen, say so directly | ||
| - Link back to the rendering-and-styling migration analysis doc for deeper maintainer detail instead of duplicating it | ||
|
|
||
| ### 6. Accessibility and behavior changes | ||
|
|
||
| Explain changes that affect product behavior or accessibility expectations. | ||
|
|
||
| Use these **`###` subheadings** when they apply: | ||
|
|
||
| - `### Accessibility improvements and new expectations` | ||
| - `### Behavior changes to validate in product` | ||
| - `### Cases that may need product review` | ||
|
|
||
| Requirements: | ||
|
|
||
| - Focus on what consumers need to validate in their application, not only on implementation details | ||
| - Call out changed semantics, focus behavior, labels, announcements, or interaction patterns | ||
| - Mention when consumers may need to update surrounding markup, accessible names, helper text, or testing expectations | ||
| - Link to the accessibility migration analysis doc for deeper background when available | ||
|
|
||
| ### 7. Testing and rollout guidance | ||
|
|
||
| This section must include practical rollout advice, not just test reminders. | ||
|
|
||
| Use these **`###` subheadings** in order: | ||
|
|
||
| - `### Visual QA` | ||
| - `### Accessibility QA` | ||
| - `### Automated tests to update` | ||
| - `### Rollout and fallback strategy` | ||
|
|
||
| Requirements: | ||
|
|
||
| - Tell consumers what visual changes to expect and verify | ||
| - Include accessibility checks that matter for this component | ||
| - Call out test categories likely to break: selectors, snapshots, ARIA assertions, event expectations, or interaction flows | ||
| - When appropriate, recommend phased rollout, wrapper-based fallback, feature flags, or side-by-side verification | ||
| - If fallback guidance is not component-specific, provide a concise default recommendation rather than leaving the section empty | ||
|
|
||
| ### 8. Migration checklist | ||
|
|
||
| Use a markdown task list (`- [ ]`) with concrete, verifiable actions. Cover: | ||
|
|
||
| - code updates | ||
| - styling updates | ||
| - accessibility review | ||
| - automated test updates | ||
| - rollout or release readiness | ||
|
|
||
| ### 9. References | ||
|
|
||
| Include the most relevant sources used to write the guide. | ||
|
|
||
| At minimum, link to: | ||
|
|
||
| - the component's 1st-gen README or public docs when available | ||
| - the component's related migration analysis docs when available | ||
| - any relevant internal contributor docs that support the migration guidance | ||
|
|
||
| ## Writing style | ||
|
|
||
| - Write for readers who are migrating product code, not building the component internals | ||
| - Prefer direct instructions such as "Replace", "Remove", "Verify", and "Do not rely on" | ||
| - Avoid vague statements like "may differ" when the source shows exactly what changed | ||
| - Avoid duplicating deep implementation detail from the analysis docs; summarize the impact and link out | ||
| - Use Adobe documentation standards and plain, scannable wording | ||
|
|
||
| ## Quality bar | ||
|
|
||
| Before finishing, confirm the guide answers these questions clearly: | ||
|
|
||
| - What component should I migrate to? | ||
| - What code do I need to change? | ||
| - What styling assumptions might break? | ||
| - What accessibility or behavior changes should I verify? | ||
| - What tests do I need to update? | ||
| - How should I roll this out safely? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ | |
| "disableable", | ||
| "effectful", | ||
| "focusable", | ||
| "Focusgroup", | ||
| "haspopup", | ||
| "highcontrast", | ||
| "labelledby", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to quiet spell check