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 SettingDescriptor MUST be placed in the lowest architectural layer where the setting is used.
    • Core / Model Settings: If a setting is used by core/sdk (or models/), its SettingDescriptor should be located in core/sdk (or models/).
    • Panel / UI Settings: If a setting is only used by UI components or a specific panel (e.g. panels/console/), its SettingDescriptor MUST GO INTO ui/settings/FooSettings.ts (e.g. ui/settings/ConsoleSettings.ts where Foo is the panel name).
  • CRITICAL RULE — PANEL DESCRIPTORS MUST NOT BE PLACED IN panels/:
    • A SettingDescriptor MUST NOT be placed inside a panels/ directory (e.g. panels/console/ConsoleSettings.ts).
    • Reason: Panel -meta.ts files (e.g. panels/console/console-meta.ts) need to import the SettingDescriptor to call SettingsUI.SettingUIRegistration.register(descriptor, uiDescriptor). -meta.ts files are loaded early and MUST NOT import from panels/ (which would break lazy-loading of panel bundles). Since ui/settings/ is in the ui/ layer below panels/, -meta.ts files can safely import from ui/settings/.
  • CRITICAL RULE — MUST NOT BE IN A -meta.ts FILE:
    • A SettingDescriptor MUST NOT be placed in a -meta.ts file.
    • Reason: Actual runtime code (e.g. models, panels, SDKs) needs to import the descriptor directly to call Settings.instance().resolve(descriptor). Preload -meta.ts files are meant for lazy-loaded extension registrations and must not be imported by runtime code to avoid circular dependencies and module boundary violations.
Installs
2
GitHub Stars
4.1K
First Seen
Nov 6, 2026