devtools-setting-migration
Installation
SKILL.md
DevTools Setting Migration Guide
This skill guide describes how to migrate an existing legacy SettingRegistration in DevTools by splitting it into a SettingDescriptor (non-UI descriptor) and a SettingUIDescriptor (UI descriptor).
Key Principles & Layer Boundaries
1. SettingDescriptor Location ("Lowest Layer")
- Lowest Layer Rule: A
SettingDescriptorMUST be placed in the lowest architectural layer where the setting is used.- Core / Model Settings: If a setting is used by
core/sdk(ormodels/), itsSettingDescriptorshould be located incore/sdk(ormodels/). - Panel / UI Settings: If a setting is only used by UI components or a specific panel (e.g.
panels/console/), itsSettingDescriptorMUST GO INTOui/settings/FooSettings.ts(e.g.ui/settings/ConsoleSettings.tswhereFoois the panel name).
- Core / Model Settings: If a setting is used by
- CRITICAL RULE — PANEL DESCRIPTORS MUST NOT BE PLACED IN
panels/:- A
SettingDescriptorMUST NOT be placed inside apanels/directory (e.g.panels/console/ConsoleSettings.ts). - Reason: Panel
-meta.tsfiles (e.g.panels/console/console-meta.ts) need to import theSettingDescriptorto callSettingsUI.SettingUIRegistration.register(descriptor, uiDescriptor).-meta.tsfiles are loaded early and MUST NOT import frompanels/(which would break lazy-loading of panel bundles). Sinceui/settings/is in theui/layer belowpanels/,-meta.tsfiles can safely import fromui/settings/.
- A
- CRITICAL RULE — MUST NOT BE IN A
-meta.tsFILE:- A
SettingDescriptorMUST NOT be placed in a-meta.tsfile. - Reason: Actual runtime code (e.g. models, panels, SDKs) needs to import the descriptor directly to call
Settings.instance().resolve(descriptor). Preload-meta.tsfiles are meant for lazy-loaded extension registrations and must not be imported by runtime code to avoid circular dependencies and module boundary violations.
- A