get_framework_guidance
Retrieves mandatory workflow guidance for ServiceNow Next Experience UI Framework projects, covering Storybook setup, component scaffolding, platform components, runtime shims, and manifests.
Instructions
MANDATORY workflow guidance for ServiceNow Now/Next Experience UI Framework projects. MUST use next-ui-storybook with @dylanlindgren/next-ui-storybook-addon as the default local development and preview workflow. For existing projects, inspect their Storybook configuration, package scripts, stories, lockfile, and instructions before migrating; preserve compatible setup and make targeted changes rather than overwriting project files. For new components with no existing local style, MUST prefer the JSX scaffold returned by get_component_scaffold and MUST NOT hand-write low-level createElement trees unless the repo already uses that pattern. MUST prefer platform components such as now-card, now-button, and similar instance-backed HDS components before creating custom equivalents. MUST import the corresponding package for any HDS component used in JSX or markup, for example import "@servicenow/now-card" or import "@servicenow/now-button". MUST declare instance-backed platform packages in package.json under optionalDependencies with version "instance" rather than leaving them implicit. MUST also use the local runtime shims at src/runtime/ui-core.js and src/runtime/snabbdom.js for createCustomElement and the renderer. Runtime shims MUST import servicenowUiCore and servicenowUiRendererSnabbdom from @servicenow/ui-mega. Neither component source nor runtime shim files may import or re-export from @servicenow/ui-core or @servicenow/ui-renderer-snabbdom; wrapping those original packages in local files does not satisfy this requirement. JSX must use className instead of class, and styles must live in a separate .scss file per component, imported and declared on the component definition via the styles property. This tool includes the createCustomElement stub pattern, the agent workflow contract, the sample project structure, Storybook local-development and migration guidance, manifest rules, instance-backed dependency patterns, and the platform-component-first decision flow. When called without arguments, it defaults to create-custom-element guidance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Optional guidance topic to retrieve directly. | |
| question | No | Optional free-text question used to choose the closest bundled guidance topic. |