- Nx 22.7 monorepo (pnpm 11.1, TypeScript 5.9, Node 24) - apps/api: NestJS 11 (CJS conforme CODING-RULES.md PGD-DB-004) - apps/web: React 19 + Vite 8 (ESM) - libs/shared/api-interface: Zod contract base - Docker Compose dev: Postgres 18, Valkey 8, MinIO, Mailpit - WDS artifacts: - design-artifacts/A-Product-Brief/ (5 docs canônicos + 16 dialogs) - design-artifacts/B-Trigger-Map/ (hub + 4 personas + feature impact) - Stack canon: STACK.md v2.2 + CODING-RULES.md v2.0 + brand.md - AGENTS.md + README.md como entrada para devs/agentes Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.1 KiB
2.1 KiB
name, description
| name | description |
|---|---|
| import-design-system | Import an existing design system into the WDS format |
Import Design System
Goal: Bring an existing design system into WDS — from a URL, file export, or Figma project.
INITIALIZATION
Design Log
Read {output_folder}/_progress/00-design-log.md. Check Current and Backlog for context.
Steps
Step 1: Identify Source
Ask the user for the design system source:
- URL — Public design system documentation (e.g., Material UI, Chakra, custom)
- File — Exported tokens file (JSON, CSS custom properties, SCSS variables)
- Figma — Figma design system file (via Figma MCP or export)
- Code — Existing codebase with component library
Step 2: Extract Tokens
Read the source and extract design tokens:
- Colors — Primary, secondary, semantic, neutrals
- Typography — Font families, sizes, weights, line heights
- Spacing — Scale values, named spacing tokens
- Shadows — Elevation levels
- Borders — Radius values, border styles
- Breakpoints — Responsive breakpoints
- Motion — Transition durations, easing curves
Present extracted tokens to user for review. Mark any ambiguous mappings.
Step 3: Extract Components
Identify reusable components from the source:
- List all components found
- For each: name, props/variants, token dependencies
- Map to WDS component template format
- Flag components that don't map cleanly
Present component list for user approval.
Step 4: Generate Design System Files
Create the WDS design system structure:
design-tokens.md— All extracted tokens in WDS formatcomponents/*.md— One file per componentcomponent-library-config.md— Configuration and metadata
Step 5: Validate Import
Run validation:
- All tokens referenced by components exist
- No orphaned tokens (defined but never used)
- Naming conventions consistent
- Component variants complete
Present validation report. Fix issues interactively.
AFTER COMPLETION
- Update design log
- Suggest running [B] Browse Design System to explore the import
- Return to Phase 7 Activity Menu