@damenor/agent-docs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -0
- package/dist/index.js +568 -0
- package/package.json +53 -0
- package/templates/base/AGENTS.md +177 -0
- package/templates/base/CHANGELOG.md +86 -0
- package/templates/base/README.md +110 -0
- package/templates/base/docs/CONTEXT.md +111 -0
- package/templates/base/docs/README.md +131 -0
- package/templates/base/docs/adr/TEMPLATE.md +83 -0
- package/templates/modules/agents/.agents/agents/doc-designer.md +56 -0
- package/templates/modules/agents/.agents/agents/doc-maintainer.md +54 -0
- package/templates/modules/agents/.agents/agents/doc-reviewer.md +80 -0
- package/templates/modules/agents/.agents/agents/doc-writer.md +66 -0
- package/templates/modules/agents/.agents/agents/reviewer.md +138 -0
- package/templates/modules/agents/.agents/skills/doc-design/SKILL.md +359 -0
- package/templates/modules/agents/.agents/skills/doc-design/references/design-system-format.md +550 -0
- package/templates/modules/agents/.agents/skills/doc-maintain/SKILL.md +345 -0
- package/templates/modules/agents/.agents/skills/doc-maintain/references/triggers.md +311 -0
- package/templates/modules/agents/.agents/skills/doc-review/SKILL.md +324 -0
- package/templates/modules/agents/.agents/skills/doc-review/references/health-checklist.md +290 -0
- package/templates/modules/agents/.agents/skills/doc-scaffold/SKILL.md +277 -0
- package/templates/modules/agents/.agents/skills/doc-scaffold/references/diataxis-quick-ref.md +149 -0
- package/templates/modules/agents/.agents/skills/doc-write/SKILL.md +414 -0
- package/templates/modules/agents/.agents/skills/doc-write/references/adr-format.md +194 -0
- package/templates/modules/agents/.agents/skills/doc-write/references/diataxis-patterns.md +351 -0
- package/templates/modules/ci/.github/workflows/docs-check.yml +94 -0
- package/templates/modules/design/docs/DESIGN.md +253 -0
- package/templates/modules/explanation/docs/explanation/agent-flow.md +15 -0
- package/templates/modules/explanation/docs/explanation/architecture.md +138 -0
- package/templates/modules/guides/docs/guides/deployment.md +189 -0
- package/templates/modules/guides/docs/guides/runbooks/TEMPLATE.md +86 -0
- package/templates/modules/guides/docs/guides/troubleshooting.md +65 -0
- package/templates/modules/operations/docs/operations/README.md +115 -0
- package/templates/modules/product/docs/product/overview.md +90 -0
- package/templates/modules/product/docs/roadmap.md +80 -0
- package/templates/modules/reference/docs/reference/api.md +131 -0
- package/templates/modules/reference/docs/reference/code-style.md +275 -0
- package/templates/modules/reference/docs/reference/configuration.md +117 -0
- package/templates/modules/reference/docs/reference/infrastructure.md +191 -0
- package/templates/modules/tutorials/docs/tutorials/environment-setup.md +212 -0
- package/templates/modules/tutorials/docs/tutorials/first-task.md +246 -0
- package/templates/modules/tutorials/docs/tutorials/quick-start.md +146 -0
- package/templates/shared/.editorconfig +20 -0
- package/templates/shared/.markdownlint.json +14 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
---
|
|
2
|
+
created: "2024-01-15"
|
|
3
|
+
status: active
|
|
4
|
+
type: reference
|
|
5
|
+
tags: [design-system, tokens, formato, yaml]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Design System Format — Referencia Completa
|
|
9
|
+
|
|
10
|
+
## Esquema YAML Completo
|
|
11
|
+
|
|
12
|
+
### Sección: colors
|
|
13
|
+
|
|
14
|
+
```yaml
|
|
15
|
+
colors:
|
|
16
|
+
brand:
|
|
17
|
+
primary: "#3B82F6" # Color principal de la marca
|
|
18
|
+
secondary: "#8B5CF6" # Color secundario
|
|
19
|
+
accent: "#EC4899" # Color de acento
|
|
20
|
+
surface:
|
|
21
|
+
background: "#FFFFFF" # Fondo principal
|
|
22
|
+
card: "#F9FAFB" # Fondo de cards
|
|
23
|
+
elevated: "#FFFFFF" # Fondo de elementos elevados
|
|
24
|
+
overlay: "rgba(0,0,0,0.5)" # Fondo de overlays
|
|
25
|
+
text:
|
|
26
|
+
primary: "#111827" # Texto principal
|
|
27
|
+
secondary: "#6B7280" # Texto secundario
|
|
28
|
+
tertiary: "#9CA3AF" # Texto terciario
|
|
29
|
+
disabled: "#D1D5DB" # Texto deshabilitado
|
|
30
|
+
inverse: "#FFFFFF" # Texto sobre fondo oscuro
|
|
31
|
+
semantic:
|
|
32
|
+
success: "#10B981" # Éxito
|
|
33
|
+
success-light: "#D1FAE5" # Éxito (fondo)
|
|
34
|
+
warning: "#F59E0B" # Advertencia
|
|
35
|
+
warning-light: "#FEF3C7" # Advertencia (fondo)
|
|
36
|
+
error: "#EF4444" # Error
|
|
37
|
+
error-light: "#FEE2E2" # Error (fondo)
|
|
38
|
+
info: "#3B82F6" # Información
|
|
39
|
+
info-light: "#DBEAFE" # Información (fondo)
|
|
40
|
+
dark:
|
|
41
|
+
background: "#1F2937" # Fondo en modo oscuro
|
|
42
|
+
card: "#374151" # Card en modo oscuro
|
|
43
|
+
text: "#F9FAFB" # Texto en modo oscuro
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Ejemplo mínimo de colores
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
colors:
|
|
50
|
+
brand:
|
|
51
|
+
primary: "#3B82F6"
|
|
52
|
+
secondary: "#8B5CF6"
|
|
53
|
+
surface:
|
|
54
|
+
background: "#FFFFFF"
|
|
55
|
+
card: "#F9FAFB"
|
|
56
|
+
text:
|
|
57
|
+
primary: "#111827"
|
|
58
|
+
secondary: "#6B7280"
|
|
59
|
+
semantic:
|
|
60
|
+
success: "#10B981"
|
|
61
|
+
warning: "#F59E0B"
|
|
62
|
+
error: "#EF4444"
|
|
63
|
+
info: "#3B82F6"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### Sección: typography
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
typography:
|
|
72
|
+
font-family:
|
|
73
|
+
sans: "Inter, system-ui, -apple-system, sans-serif"
|
|
74
|
+
mono: "JetBrains Mono, Fira Code, monospace"
|
|
75
|
+
display: "Cal Sans, Inter, sans-serif"
|
|
76
|
+
heading-xl:
|
|
77
|
+
font-size: "2.5rem"
|
|
78
|
+
font-weight: "800"
|
|
79
|
+
line-height: "1.1"
|
|
80
|
+
letter-spacing: "-0.02em"
|
|
81
|
+
heading-lg:
|
|
82
|
+
font-size: "2rem"
|
|
83
|
+
font-weight: "700"
|
|
84
|
+
line-height: "1.2"
|
|
85
|
+
letter-spacing: "-0.01em"
|
|
86
|
+
heading-md:
|
|
87
|
+
font-size: "1.5rem"
|
|
88
|
+
font-weight: "600"
|
|
89
|
+
line-height: "1.3"
|
|
90
|
+
heading-sm:
|
|
91
|
+
font-size: "1.25rem"
|
|
92
|
+
font-weight: "600"
|
|
93
|
+
line-height: "1.4"
|
|
94
|
+
body-lg:
|
|
95
|
+
font-size: "1.125rem"
|
|
96
|
+
font-weight: "400"
|
|
97
|
+
line-height: "1.75"
|
|
98
|
+
body-md:
|
|
99
|
+
font-size: "1rem"
|
|
100
|
+
font-weight: "400"
|
|
101
|
+
line-height: "1.6"
|
|
102
|
+
body-sm:
|
|
103
|
+
font-size: "0.875rem"
|
|
104
|
+
font-weight: "400"
|
|
105
|
+
line-height: "1.5"
|
|
106
|
+
caption:
|
|
107
|
+
font-size: "0.75rem"
|
|
108
|
+
font-weight: "500"
|
|
109
|
+
line-height: "1.4"
|
|
110
|
+
letter-spacing: "0.02em"
|
|
111
|
+
text-transform: "uppercase"
|
|
112
|
+
overline:
|
|
113
|
+
font-size: "0.625rem"
|
|
114
|
+
font-weight: "700"
|
|
115
|
+
line-height: "1.4"
|
|
116
|
+
letter-spacing: "0.08em"
|
|
117
|
+
text-transform: "uppercase"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Ejemplo mínimo de tipografía
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
typography:
|
|
124
|
+
font-family:
|
|
125
|
+
sans: "Inter, system-ui, sans-serif"
|
|
126
|
+
mono: "JetBrains Mono, monospace"
|
|
127
|
+
heading-xl: { font-size: "2rem", font-weight: "700", line-height: "1.2" }
|
|
128
|
+
heading-lg: { font-size: "1.5rem", font-weight: "600", line-height: "1.3" }
|
|
129
|
+
body-md: { font-size: "1rem", font-weight: "400", line-height: "1.6" }
|
|
130
|
+
body-sm: { font-size: "0.875rem", font-weight: "400", line-height: "1.5" }
|
|
131
|
+
caption: { font-size: "0.75rem", font-weight: "400", line-height: "1.4" }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Sección: spacing
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
spacing:
|
|
140
|
+
scale: [0, "0.125rem", "0.25rem", "0.5rem", "0.75rem", "1rem", "1.5rem", "2rem", "3rem", "4rem", "6rem", "8rem"]
|
|
141
|
+
tokens:
|
|
142
|
+
"0": "0"
|
|
143
|
+
"0.5": "0.125rem"
|
|
144
|
+
"1": "0.25rem"
|
|
145
|
+
"1.5": "0.375rem"
|
|
146
|
+
"2": "0.5rem"
|
|
147
|
+
"3": "0.75rem"
|
|
148
|
+
"4": "1rem"
|
|
149
|
+
"5": "1.25rem"
|
|
150
|
+
"6": "1.5rem"
|
|
151
|
+
"8": "2rem"
|
|
152
|
+
"10": "2.5rem"
|
|
153
|
+
"12": "3rem"
|
|
154
|
+
"16": "4rem"
|
|
155
|
+
"20": "5rem"
|
|
156
|
+
"24": "6rem"
|
|
157
|
+
"32": "8rem"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
#### Ejemplo mínimo de spacing
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
spacing:
|
|
164
|
+
tokens: { xs: "0.25rem", sm: "0.5rem", md: "1rem", lg: "1.5rem", xl: "2rem", "2xl": "3rem", "3xl": "4rem" }
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### Sección: rounded
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
rounded:
|
|
173
|
+
scale: [0, "0.125rem", "0.25rem", "0.375rem", "0.5rem", "0.75rem", "1rem", "1.5rem", "2rem", "9999px"]
|
|
174
|
+
tokens:
|
|
175
|
+
none: "0"
|
|
176
|
+
sm: "0.25rem"
|
|
177
|
+
md: "0.5rem"
|
|
178
|
+
lg: "0.75rem"
|
|
179
|
+
xl: "1rem"
|
|
180
|
+
"2xl": "1.5rem"
|
|
181
|
+
"3xl": "2rem"
|
|
182
|
+
full: "9999px"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### Sección: elevation
|
|
188
|
+
|
|
189
|
+
```yaml
|
|
190
|
+
elevation:
|
|
191
|
+
tiers:
|
|
192
|
+
none: "none"
|
|
193
|
+
xs: "0 1px 2px rgba(0, 0, 0, 0.05)"
|
|
194
|
+
sm: "0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)"
|
|
195
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"
|
|
196
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
197
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
198
|
+
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
199
|
+
inner: "inset 0 2px 4px rgba(0, 0, 0, 0.06)"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Sección: components
|
|
205
|
+
|
|
206
|
+
#### Formato de componente
|
|
207
|
+
|
|
208
|
+
```yaml
|
|
209
|
+
components:
|
|
210
|
+
[component-name]:
|
|
211
|
+
description: "Descripción breve del componente"
|
|
212
|
+
variants: [variant1, variant2, variant3]
|
|
213
|
+
sizes: [sm, md, lg]
|
|
214
|
+
states: [default, hover, active, focus, disabled]
|
|
215
|
+
base: "Propiedades base del componente usando tokens"
|
|
216
|
+
[variant-name]:
|
|
217
|
+
bg: "{colors.xxx}"
|
|
218
|
+
text: "{colors.xxx}"
|
|
219
|
+
border: "valor"
|
|
220
|
+
shadow: "{elevation.xxx}"
|
|
221
|
+
tokens:
|
|
222
|
+
radius: "{rounded.md}"
|
|
223
|
+
padding-sm: "{spacing.sm} {spacing.md}"
|
|
224
|
+
padding-md: "{spacing.md} {spacing.lg}"
|
|
225
|
+
padding-lg: "{spacing.lg} {spacing.xl}"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
#### Ejemplo: Button
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
components:
|
|
232
|
+
button:
|
|
233
|
+
description: "Botón interactivo para acciones primarias y secundarias"
|
|
234
|
+
variants: [primary, secondary, outline, ghost, danger]
|
|
235
|
+
sizes: [sm, md, lg]
|
|
236
|
+
states: [default, hover, active, focus, disabled]
|
|
237
|
+
base: "font-weight: 600, border-radius: {rounded.md}, transition: all 150ms"
|
|
238
|
+
primary:
|
|
239
|
+
bg: "{colors.brand.primary}"
|
|
240
|
+
text: "#FFFFFF"
|
|
241
|
+
hover-bg: "#2563EB"
|
|
242
|
+
active-bg: "#1D4ED8"
|
|
243
|
+
secondary:
|
|
244
|
+
bg: "{colors.brand.secondary}"
|
|
245
|
+
text: "#FFFFFF"
|
|
246
|
+
hover-bg: "#7C3AED"
|
|
247
|
+
outline:
|
|
248
|
+
bg: "transparent"
|
|
249
|
+
text: "{colors.brand.primary}"
|
|
250
|
+
border: "2px solid {colors.brand.primary}"
|
|
251
|
+
hover-bg: "{colors.brand.primary}"
|
|
252
|
+
hover-text: "#FFFFFF"
|
|
253
|
+
ghost:
|
|
254
|
+
bg: "transparent"
|
|
255
|
+
text: "{colors.text.secondary}"
|
|
256
|
+
hover-bg: "{colors.surface.card}"
|
|
257
|
+
danger:
|
|
258
|
+
bg: "{colors.semantic.error}"
|
|
259
|
+
text: "#FFFFFF"
|
|
260
|
+
hover-bg: "#DC2626"
|
|
261
|
+
tokens:
|
|
262
|
+
radius: "{rounded.md}"
|
|
263
|
+
padding-sm: "{spacing.2} {spacing.3}"
|
|
264
|
+
padding-md: "{spacing.2} {spacing.4}"
|
|
265
|
+
padding-lg: "{spacing.3} {spacing.6}"
|
|
266
|
+
font-sm: "{typography.body-sm}"
|
|
267
|
+
font-md: "{typography.body-md}"
|
|
268
|
+
font-lg: "{typography.body-lg}"
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### Ejemplo: Card
|
|
272
|
+
|
|
273
|
+
```yaml
|
|
274
|
+
components:
|
|
275
|
+
card:
|
|
276
|
+
description: "Contenedor de contenido con opciones de elevación"
|
|
277
|
+
variants: [default, outlined, elevated, interactive]
|
|
278
|
+
base: "border-radius: {rounded.lg}, padding: {spacing.6}, background: {colors.surface.card}"
|
|
279
|
+
default:
|
|
280
|
+
border: "1px solid #E5E7EB"
|
|
281
|
+
shadow: "{elevation.none}"
|
|
282
|
+
outlined:
|
|
283
|
+
border: "1px solid #D1D5DB"
|
|
284
|
+
shadow: "{elevation.none}"
|
|
285
|
+
elevated:
|
|
286
|
+
border: "none"
|
|
287
|
+
shadow: "{elevation.md}"
|
|
288
|
+
interactive:
|
|
289
|
+
border: "1px solid #E5E7EB"
|
|
290
|
+
shadow: "{elevation.sm}"
|
|
291
|
+
hover-shadow: "{elevation.md}"
|
|
292
|
+
cursor: "pointer"
|
|
293
|
+
tokens:
|
|
294
|
+
radius: "{rounded.lg}"
|
|
295
|
+
padding: "{spacing.6}"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Ejemplo: Input
|
|
299
|
+
|
|
300
|
+
```yaml
|
|
301
|
+
components:
|
|
302
|
+
input:
|
|
303
|
+
description: "Campo de entrada de texto"
|
|
304
|
+
variants: [default, error, success, disabled]
|
|
305
|
+
sizes: [sm, md, lg]
|
|
306
|
+
base: "border: 1px solid #D1D5DB, border-radius: {rounded.md}, background: #FFFFFF, transition: border-color 150ms"
|
|
307
|
+
default:
|
|
308
|
+
border: "1px solid #D1D5DB"
|
|
309
|
+
focus-border: "{colors.brand.primary}"
|
|
310
|
+
focus-ring: "0 0 0 3px rgba(59,130,246,0.1)"
|
|
311
|
+
error:
|
|
312
|
+
border: "1px solid {colors.semantic.error}"
|
|
313
|
+
focus-ring: "0 0 0 3px rgba(239,68,68,0.1)"
|
|
314
|
+
success:
|
|
315
|
+
border: "1px solid {colors.semantic.success}"
|
|
316
|
+
disabled:
|
|
317
|
+
bg: "#F3F4F6"
|
|
318
|
+
text: "{colors.text.disabled}"
|
|
319
|
+
cursor: "not-allowed"
|
|
320
|
+
tokens:
|
|
321
|
+
radius: "{rounded.md}"
|
|
322
|
+
padding-sm: "{spacing.1} {spacing.2}"
|
|
323
|
+
padding-md: "{spacing.2} {spacing.3}"
|
|
324
|
+
padding-lg: "{spacing.3} {spacing.4}"
|
|
325
|
+
font-sm: "{typography.body-sm}"
|
|
326
|
+
font-md: "{typography.body-md}"
|
|
327
|
+
font-lg: "{typography.body-lg}"
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### Ejemplo: Navigation
|
|
331
|
+
|
|
332
|
+
```yaml
|
|
333
|
+
components:
|
|
334
|
+
nav:
|
|
335
|
+
description: "Barra de navegación principal"
|
|
336
|
+
variants: [default, fixed, transparent]
|
|
337
|
+
base: "padding: {spacing.4} {spacing.6}, display: flex, align-items: center"
|
|
338
|
+
default:
|
|
339
|
+
bg: "#FFFFFF"
|
|
340
|
+
border-bottom: "1px solid #E5E7EB"
|
|
341
|
+
shadow: "{elevation.none}"
|
|
342
|
+
fixed:
|
|
343
|
+
position: "fixed"
|
|
344
|
+
z-index: "50"
|
|
345
|
+
shadow: "{elevation.sm}"
|
|
346
|
+
transparent:
|
|
347
|
+
bg: "transparent"
|
|
348
|
+
border: "none"
|
|
349
|
+
tokens:
|
|
350
|
+
height: "4rem"
|
|
351
|
+
padding: "{spacing.4} {spacing.6}"
|
|
352
|
+
logo-height: "2rem"
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
### Sección: responsive
|
|
358
|
+
|
|
359
|
+
```yaml
|
|
360
|
+
responsive:
|
|
361
|
+
breakpoints:
|
|
362
|
+
xs: "475px" # Mobile landscape
|
|
363
|
+
sm: "640px" # Tablet portrait
|
|
364
|
+
md: "768px" # Tablet landscape
|
|
365
|
+
lg: "1024px" # Desktop
|
|
366
|
+
xl: "1280px" # Desktop large
|
|
367
|
+
"2xl": "1536px" # Desktop extra large
|
|
368
|
+
containers:
|
|
369
|
+
sm: "640px"
|
|
370
|
+
md: "768px"
|
|
371
|
+
lg: "1024px"
|
|
372
|
+
xl: "1280px"
|
|
373
|
+
strategy: "mobile-first"
|
|
374
|
+
media-queries:
|
|
375
|
+
mobile: "@media (max-width: 639px)"
|
|
376
|
+
tablet: "@media (min-width: 640px) and (max-width: 1023px)"
|
|
377
|
+
desktop: "@media (min-width: 1024px)"
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Sincronización con Código
|
|
383
|
+
|
|
384
|
+
### CSS Variables → DESIGN.md
|
|
385
|
+
|
|
386
|
+
```css
|
|
387
|
+
:root {
|
|
388
|
+
--color-primary: #3B82F6;
|
|
389
|
+
--spacing-md: 1rem;
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
→ Mapear a:
|
|
394
|
+
```yaml
|
|
395
|
+
colors:
|
|
396
|
+
brand:
|
|
397
|
+
primary: "#3B82F6"
|
|
398
|
+
spacing:
|
|
399
|
+
tokens:
|
|
400
|
+
md: "1rem"
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Tailwind Config → DESIGN.md
|
|
404
|
+
|
|
405
|
+
```javascript
|
|
406
|
+
module.exports = {
|
|
407
|
+
theme: {
|
|
408
|
+
extend: {
|
|
409
|
+
colors: {
|
|
410
|
+
primary: '#3B82F6',
|
|
411
|
+
},
|
|
412
|
+
spacing: {
|
|
413
|
+
'128': '32rem',
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
→ Mapear config completo a secciones correspondientes.
|
|
421
|
+
|
|
422
|
+
### DESIGN.md → CSS Variables
|
|
423
|
+
|
|
424
|
+
```yaml
|
|
425
|
+
colors:
|
|
426
|
+
brand:
|
|
427
|
+
primary: "#3B82F6"
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
→ Generar:
|
|
431
|
+
```css
|
|
432
|
+
:root {
|
|
433
|
+
--color-brand-primary: #3B82F6;
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### DESIGN.md → Tailwind Config
|
|
438
|
+
|
|
439
|
+
```yaml
|
|
440
|
+
colors:
|
|
441
|
+
brand:
|
|
442
|
+
primary: "#3B82F6"
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
→ Generar:
|
|
446
|
+
```javascript
|
|
447
|
+
module.exports = {
|
|
448
|
+
theme: {
|
|
449
|
+
extend: {
|
|
450
|
+
colors: {
|
|
451
|
+
brand: {
|
|
452
|
+
primary: '#3B82F6',
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
## Ejemplo Completo de DESIGN.md
|
|
463
|
+
|
|
464
|
+
```yaml
|
|
465
|
+
---
|
|
466
|
+
created: "2024-03-15"
|
|
467
|
+
status: active
|
|
468
|
+
type: reference
|
|
469
|
+
tags: [design-system, tokens, componentes]
|
|
470
|
+
colors:
|
|
471
|
+
brand:
|
|
472
|
+
primary: "#3B82F6"
|
|
473
|
+
secondary: "#8B5CF6"
|
|
474
|
+
surface:
|
|
475
|
+
background: "#FFFFFF"
|
|
476
|
+
card: "#F9FAFB"
|
|
477
|
+
text:
|
|
478
|
+
primary: "#111827"
|
|
479
|
+
secondary: "#6B7280"
|
|
480
|
+
semantic:
|
|
481
|
+
success: "#10B981"
|
|
482
|
+
warning: "#F59E0B"
|
|
483
|
+
error: "#EF4444"
|
|
484
|
+
info: "#3B82F6"
|
|
485
|
+
typography:
|
|
486
|
+
font-family:
|
|
487
|
+
sans: "Inter, system-ui, sans-serif"
|
|
488
|
+
mono: "JetBrains Mono, monospace"
|
|
489
|
+
heading-xl: { font-size: "2rem", font-weight: "700", line-height: "1.2" }
|
|
490
|
+
heading-lg: { font-size: "1.5rem", font-weight: "600", line-height: "1.3" }
|
|
491
|
+
body-md: { font-size: "1rem", font-weight: "400", line-height: "1.6" }
|
|
492
|
+
body-sm: { font-size: "0.875rem", font-weight: "400", line-height: "1.5" }
|
|
493
|
+
caption: { font-size: "0.75rem", font-weight: "400", line-height: "1.4" }
|
|
494
|
+
spacing:
|
|
495
|
+
tokens: { xs: "0.25rem", sm: "0.5rem", md: "1rem", lg: "1.5rem", xl: "2rem", "2xl": "3rem" }
|
|
496
|
+
rounded:
|
|
497
|
+
tokens: { none: "0", sm: "0.25rem", md: "0.5rem", lg: "0.75rem", xl: "1rem", full: "9999px" }
|
|
498
|
+
elevation:
|
|
499
|
+
tiers:
|
|
500
|
+
none: "none"
|
|
501
|
+
sm: "0 1px 3px rgba(0,0,0,0.1)"
|
|
502
|
+
md: "0 4px 6px rgba(0,0,0,0.1)"
|
|
503
|
+
lg: "0 10px 15px rgba(0,0,0,0.1)"
|
|
504
|
+
components:
|
|
505
|
+
button:
|
|
506
|
+
variants: [primary, secondary, outline, ghost, danger]
|
|
507
|
+
sizes: [sm, md, lg]
|
|
508
|
+
base: "font-weight: 600, border-radius: {rounded.md}"
|
|
509
|
+
primary: { bg: "{colors.brand.primary}", text: "#FFFFFF" }
|
|
510
|
+
card:
|
|
511
|
+
variants: [default, elevated]
|
|
512
|
+
base: "border-radius: {rounded.lg}, padding: {spacing.lg}, background: {colors.surface.card}"
|
|
513
|
+
input:
|
|
514
|
+
variants: [default, error, disabled]
|
|
515
|
+
base: "border: 1px solid #D1D5DB, border-radius: {rounded.md}"
|
|
516
|
+
responsive:
|
|
517
|
+
breakpoints: { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" }
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
## Visión General
|
|
521
|
+
|
|
522
|
+
Sistema de diseño basado en tokens con jerarquía de tres niveles:
|
|
523
|
+
1. **Tokens base**: Valores crudos (colores hex, tamaños rem)
|
|
524
|
+
2. **Tokens semánticos**: Valores con propósito (success, error)
|
|
525
|
+
3. **Tokens de componente**: Valores por defecto de cada componente
|
|
526
|
+
|
|
527
|
+
## Paleta de Colores
|
|
528
|
+
|
|
529
|
+
La paleta se organiza en 4 categorías:
|
|
530
|
+
- **Brand**: Identidad visual de la marca
|
|
531
|
+
- **Surface**: Fondos y superficies
|
|
532
|
+
- **Text**: Jerarquía de texto
|
|
533
|
+
- **Semantic**: Estados y feedback
|
|
534
|
+
|
|
535
|
+
## Uso de Tokens
|
|
536
|
+
|
|
537
|
+
En CSS:
|
|
538
|
+
```css
|
|
539
|
+
.button-primary {
|
|
540
|
+
background: var(--color-brand-primary);
|
|
541
|
+
border-radius: var(--rounded-md);
|
|
542
|
+
padding: var(--spacing-sm) var(--spacing-md);
|
|
543
|
+
}
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
En Tailwind:
|
|
547
|
+
```html
|
|
548
|
+
<button class="bg-primary rounded-md px-4 py-2">
|
|
549
|
+
```
|
|
550
|
+
```
|