AI 时代的设计系统实践
Vibe Coding 是一种借助 AI(如 Cursor、Antigravity)进行开发的新范式。设计系统为 AI 提供了清晰的规则和约束,让 AI 生成的代码更加一致和可预测。
# Design System Rules
## Color Usage
- Primary buttons use `bg-primary`
- Text color uses `text-foreground`
- Never use hardcoded values like #xxx
## Spacing Rules
- Component internal: space-2 to space-4
- Between components: space-4 to space-8
- Always use Tailwind spacing classes
## Component Rules
When creating buttons, always use:
```tsx
<Button variant="..." size="...">
```为 AI 提供的规则越清晰、越具体,生成的代码质量就越高。定期根据实践经验更新规则文件。