AI-Assisted Development


This repository is equipped with AI agent instructions, slash commands, and migration guides that help you work faster with AI coding assistants. Whether you're migrating a component, creating tokens, or writing tests, there's likely an AI-assisted workflow ready to help.


Getting Started

Open the repo in any AI coding assistant (Claude Code, Cursor, Codex, etc.) and it automatically picks up all the agent configuration, with no setup required.

The repo ships with:

  • Slash commands: one-shot workflows you invoke with /command-name
  • Migration guides: detailed instructions the AI follows when converting components
  • Coding conventions: rules the AI enforces automatically (testing patterns, code style, etc.)

Slash Commands

Slash commands are ready-made workflows that handle common tasks end-to-end. Type the command in your AI coding tool and it takes it from there.

/create-pr

Creates a pull request following the repo's conventions. It handles branch naming, Conventional Commits title formatting, and description templates, including the "How did you test this?" checklist for feat and fix PRs.

Copy

The AI will:

  • Rename your branch to match the PR type (for example, feat-button-loading-prop)
  • Format the title as type(scope): subject
  • Ask you for references (Slack thread, Figma spec) before creating the PR
  • Include the appropriate testing checklist

/create-goal

Turns a vague task request into a precise, self-contained goal document to paste into the goal command. It grounds the brief in the codebase first (relevant code, git history, conventions), asks you only the decisions that are genuinely yours, then writes a standalone goal under the runner's 4000-character limit.

Copy

The goal covers the whole lifecycle: change, tests, build/verify, and branch/commit/push/PR. It carries concrete anchors, such as commit SHAs, file paths, and component and token names, so it stands alone without the originating conversation.

/create-code-snippet

Generates a Storybook playground code snippet for quick demos and testing. Just describe what you want to see and the AI produces a runnable snippet.

Copy

Snippets follow playground conventions: no imports needed, Box for layout, React. prefix for hooks.

/create-token

Creates a design token across all five themes (default, odeditor, odeditor-dark, studio, studio2-light) with optional per-theme overrides. Supports foundation, semantic, and component levels.

Copy

The AI handles JSON structure, type inference, validation against existing tokens, and runs pnpm generate afterward.

/tokenize-component-from-figma

Automates applying design tokens from a Figma spec to a component's CSS files. Give it a Figma link and the component name, and it will:

  1. Fetch tokens from Figma
  2. Map Figma token names to codebase CSS variables
  3. Replace hardcoded value() calls with var(--wds-...) using proper fallbacks
  4. Apply typography mixins where appropriate
  5. Handle nested sub-component style files
Copy

/visual-test-renaming

Guides you through renaming visual tests and cleaning up generated screenshots across all themes. Handles the full lifecycle: renaming in source .visual.tsx files, deleting old screenshots, and regenerating new ones.

Copy

Migrations

The repo includes detailed migration guides that the AI follows step-by-step. You don't need to memorize the rules. Just ask the AI to perform the migration on a component.

JavaScript to TypeScript

Converts JS components to TypeScript with zero breaking changes. The AI handles:

  • File renames (.js → .tsx, removing .d.ts files)
  • Type extraction into ComponentName.types.ts
  • Data hooks consolidation into ComponentName.constants.ts
  • Driver typing (ComponentName.uni.driver.ts), keeping method descriptions but dropping the @param, @return and @returns tags the types now cover
Copy

Class to functional components

Converts class components to functional components using hooks. The AI maps:

Class PatternFunctional Pattern
this.stateuseState
componentDidMountuseEffect(() => {}, [])
componentWillUnmountcleanup in useEffect
componentDidUpdateuseEffect(() => {}, [deps])
Public methods via refforwardRef + useImperativeHandle
Copy

Both migrations preserve the public API. Props, ref methods, events, and display names remain identical.


Built-in Conventions

The AI is pre-loaded with coding conventions specific to this repo. These are enforced automatically when it writes code, so you don't need to remember them all:

ConventionWhat it does
Visual testingFollows the visualize → story → snap pattern with storybook-snapper
E2E testingUses Playwright with Sled infrastructure, correct file naming, and data-hook patterns
No setTimeoutAvoids setTimeout for timing workarounds and uses proper async patterns instead
TypeScript typesMaintains TypeScript type definitions as the source of truth
Prop documentationWrites the description of every prop it adds or changes in the same change, in the Wix writing style
Unused CSS varsRemoves unused CSS variables from Stylable files
Component token overridesOverrides literal CSS properties on Stylable-extended selectors instead of reassigning global tokens
Design tokensFollows the token hierarchy (foundation → semantic → component)
Illustration conventionsFollows the SVG build pipeline and naming patterns
Docs contentWrites guideline and introduction pages in the house voice, with real image alt text and the page conventions this site uses

Example Prompts

Here are some prompts you can use directly with the AI to accomplish common tasks:

Component work:

Copy
Copy

Testing:

Copy
Copy

Tokens and Figma:

Copy
Copy

Migrations:

Copy
Copy

Pull requests:

Copy





Last updated: 26 October 2026

Did this help?