name: 'step-08a-initialize-design-system' description: 'Create design system folder structure and initialize for the first component'
Create the design system folder structure, token placeholders, mode-specific files, and component index. Prepare for the first component addition.
{communication_language}Create design system folders:
D-Design-System/
├── components/
├── design-tokens.md (placeholder)
├── component-library-config.md (if Mode C)
└── figma-mappings.md (if Mode B)
```
📁 Created Design System Structure:
D-Design-System/
├── components/ (empty, ready for first component)
├── design-tokens.md (placeholder)
└── [mode-specific files]
✅ Folder structure ready!
````
Create initial design tokens file:
File: D-Design-System/design-tokens.md
# Design Tokens
**Status:** To be defined
Design tokens will be extracted as components are added to the design system.
## Token Categories
### Colors
- Primary colors
- Secondary colors
- Semantic colors (success, error, warning, info)
- Neutral colors
### Typography
- Font families
- Font sizes
- Font weights
- Line heights
- Letter spacing
### Spacing
- Spacing scale
- Padding values
- Margin values
- Gap values
### Layout
- Breakpoints
- Container widths
- Grid columns
### Effects
- Shadows
- Border radius
- Transitions
- Animations
---
**Tokens will be populated as components are specified.**
````
---
## Step 4: Create Mode-Specific Files
### If Mode B: Custom Design System
<action>
Create Figma mappings file:
</action>
**File:** `D-Design-System/figma-mappings.md`
markdown
Figma File: [To be specified] Last Updated: [Date]
Components in this design system are linked to Figma components for visual reference and design handoff.
Component ID → Figma Node ID
[component-id] → figma://file/[file-id]/node/[node-id]
[To be populated as components are added]
How to find Figma node IDs:
Extract node ID from URL
### If Mode C: Component Library
<action>
Create component library config:
</action>
**File:** `D-Design-System/component-library-config.md`
````markdown
# Component Library Configuration
**Library:** [shadcn/Radix/MUI/etc.]
**Version:** [Version]
**Installation:** [Installation command]
## Library Components Used
This design system uses components from [Library Name].
### Component Mappings
Format: `WDS Component → Library Component`
[To be populated as components are added]
## Customizations
### Theme Configuration
json
{ "colors": {}, "typography": {}, "spacing": {}, "borderRadius": {} }
````
[To be updated as design system grows]
## Installation Instructions
bash [Installation commands]
---
**Library documentation:** [Link]
````
---
## Step 5: Create Component Index
<action>
Create components README:
</action>
**File:** `D-Design-System/components/README.md`
markdown
Total Components: 1 Last Updated: [Date]
[None yet]
[None yet]
[None yet]
Format: [type]-[number]
Examples:
Each component file includes:
Components are added automatically as they're discovered during specification. ````
Route to create-new-component operation:
Route to: step-08b-create-new-component.md
Create interactive HTML catalog:
Load and execute: step-08e-generate-catalog.md
Initial catalog includes:
Output:
✅ Initial catalog generated
File: D-Design-System/catalog.html
Components: 1
View: file:///path/to/catalog.html
Mark design system as initialized:
Update project config:
design_system:
enabled: true
mode: [mode]
initialized: true
initialized_date: [date]
folder: D-Design-System/
first_component: [component-id]
catalog: D-Design-System/catalog.html
✅ Design system initialized
Mode: [mode]
Folder: D-Design-System/
First component: [ComponentType] [[component-id]]
Catalog: D-Design-System/catalog.html
Design system is ready to use.
Components will be extracted automatically as discovered.
Interactive catalog available for viewing.
added to the design system if they're reusable.
Next: Continue with component specification in Phase 4
Validate initialization:
If validation fails:
⚠️ Initialization Warning
Some files may not have been created successfully.
Please check:
- [List of missing files]
Would you like to retry initialization? (y/n)
If folder already exists:
⚠️ D-Design-System/ folder already exists.
This shouldn't happen for first component initialization.
Options:
1. Use existing structure (merge)
2. Backup and recreate
3. Cancel initialization
Your choice:
If component creation fails:
❌ Error creating first component.
Error: [error message]
Design system structure was created, but component addition failed.
You can add components manually or retry.
If mode not specified:
⚠️ Design system mode not specified in project config.
Please specify:
1. Custom (Figma-based)
2. Component Library (shadcn/Radix/etc.)
Your choice:
Return to design system router:
Router continues with: Adding first component to design system
This operation runs once per project. Subsequent components use create-new-component or add-variant operations. ```
Display: "Select an Option: [C] Continue to Create First Component"
ONLY WHEN [C continue option is selected and design system structure is initialized], will you then load and read fully {nextStepFile} to execute the next step.
Master Rule: Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.