--- name: dss-init description: Full DSS workflow - reset, structure, analyze, sync, build CSS arguments: - name: flags description: Optional flags (--reset, --skip-analysis) required: false --- # DSS Init Command - Full Workflow Pipeline Complete DSS initialization and build pipeline for admin-ui and storybook targets. ## Usage ``` /dss-init [--reset] [--skip-analysis] ``` ## Full Workflow 1. **Reset** (with --reset flag) - Clears all DSS data, tokens, themes - Resets skins to empty state - Removes generated CSS/stories 2. **Validate Environment** - Python3, Node.js, style-dictionary - FIGMA_TOKEN availability 3. **Create Structure** - `.dss/data/_system/themes/` - CSS output - `.dss/data/_system/tokens/` - Token JSON - Database initialization 4. **Analyze Targets** - admin-ui: web app consumer - storybook: documentation 5. **Figma Sync** (MCP required) - Uses `dss_sync_figma` tool - Populates tokens from Figma 6. **Build CSS** - Runs style-dictionary - Generates tokens.css, _tokens.scss, tokens.json ## Instructions for Claude When the user runs this command: 1. Execute: `scripts/dss-init.sh [flags]` 2. If status shows "AWAITING FIGMA SYNC": - Run `dss_sync_figma` MCP tool to populate tokens - Re-run `scripts/dss-init.sh` to build CSS 3. If status shows "READY": - admin-ui can import from `.dss/data/_system/themes/` ## Flags - `--reset`: Clear everything first (fresh start) - `--skip-analysis`: Skip code analysis step ## Typical Workflow ```bash # Fresh start scripts/dss-init.sh --reset # Populate tokens (MCP tool) dss_sync_figma # Build CSS scripts/dss-init.sh # admin-ui imports from .dss/data/_system/themes/ ``` ## Related Commands - `/dss-figma` - Sync tokens from Figma - `/dss-analyze` - Analyze specific project