specleap-framework 2.1.0 → 2.1.5
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/.agents/backend.md +3 -3
- package/.agents/frontend.md +2 -2
- package/.agents/producto.md +9 -11
- package/.claude/hooks/spec-guard.sh +132 -0
- package/.claude/settings.json.template +15 -0
- package/.clinerules +3 -3
- package/.coderabbit.yaml +2 -4
- package/.commands/compliance.md +89 -0
- package/.commands/inicio.md +15 -15
- package/.commands/nuevo/README.md +2 -2
- package/.commands/planificar.md +1 -1
- package/.continue/rules/04-git-workflow.md +5 -5
- package/.continuerules +3 -4
- package/.cursorrules +1 -1
- package/.github/copilot-instructions.md +1 -1
- package/.specleap/i18n/en.json +177 -0
- package/.specleap/i18n/es.json +177 -0
- package/.specleap/i18n.sh +63 -0
- package/CHANGELOG.md +276 -0
- package/CLAUDE.md +54 -13
- package/README.md +169 -528
- package/SETUP.md +16 -13
- package/openspec/INDEX.md +53 -0
- package/openspec/README.md +104 -0
- package/openspec/SPEC-FORMAT.md +168 -0
- package/openspec/changes/.gitkeep +0 -0
- package/openspec/cli/COMMAND_REFERENCE.md +817 -0
- package/openspec/cli/README.md +189 -0
- package/openspec/cli/apply.sh +229 -0
- package/openspec/cli/archive.sh +240 -0
- package/openspec/cli/code-review.sh +207 -0
- package/openspec/cli/common.sh +171 -0
- package/openspec/cli/enrich.sh +188 -0
- package/openspec/cli/ff.sh +329 -0
- package/openspec/cli/new.sh +260 -0
- package/openspec/cli/openspec +82 -0
- package/openspec/cli/report.sh +244 -0
- package/openspec/cli/status.sh +178 -0
- package/openspec/cli/verify.sh +246 -0
- package/openspec/config.yaml +76 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/00-original-user-story.md +5 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/01-refined-user-story.md +106 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/README.md +333 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/design.md +461 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/proposal.md +124 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/specs/functional/F001-authentication.spec.md +399 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/specs/technical/T001-jwt-implementation.spec.md +606 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/tasks.md +433 -0
- package/openspec/examples/MERMAID_DIAGRAMS.md +481 -0
- package/openspec/examples/README.md +334 -0
- package/openspec/specs/functional/.gitkeep +0 -0
- package/openspec/specs/integration/.gitkeep +0 -0
- package/openspec/specs/security/.gitkeep +0 -0
- package/openspec/specs/technical/.gitkeep +0 -0
- package/openspec/templates/.coderabbit.yaml +259 -0
- package/openspec/templates/design.md +181 -0
- package/openspec/templates/proposal.md +79 -0
- package/openspec/templates/tasks.md +193 -0
- package/package.json +10 -5
- package/rules/git-workflow.md +3 -3
- package/rules/session-protocol.md +3 -3
- package/scripts/README.md +13 -25
- package/scripts/compliance-audit.sh +325 -0
- package/scripts/generate-contract.sh +4 -4
- package/scripts/install-skills.sh +12 -11
- package/scripts/lib/render-contrato.py +1 -1
- package/scripts/quality-baseline.sh +210 -0
- package/scripts/quality-healing.sh +241 -0
- package/setup.sh +3 -3
- package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
- package/scripts/lib/jira-project-utils.sh +0 -222
- package/scripts/setup-mcp.sh +0 -654
- package/scripts/test-cuestionario.sh +0 -428
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
# 📊 Diagramas Mermaid en SpecLeap
|
|
2
|
+
|
|
3
|
+
Guía de uso de diagramas Mermaid para visualizar flujos, arquitectura, y secuencias en tus specs.
|
|
4
|
+
|
|
5
|
+
## ✅ Soporte Actual
|
|
6
|
+
|
|
7
|
+
### VSCode Local
|
|
8
|
+
✅ **Funciona con extensiones** — Instala las extensiones recomendadas:
|
|
9
|
+
- `shd101wyy.markdown-preview-enhanced` (recomendado)
|
|
10
|
+
- `bierner.markdown-mermaid` (alternativa)
|
|
11
|
+
|
|
12
|
+
### Cursor / Continue
|
|
13
|
+
✅ **Preview nativo** — Ambos IDEs renderizan Mermaid automáticamente en el preview de markdown.
|
|
14
|
+
|
|
15
|
+
### Web Browsers
|
|
16
|
+
✅ **Mermaid Live Editor** — [mermaid.live](https://mermaid.live) para testear y exportar diagramas.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 📋 Tipos de Diagramas Disponibles
|
|
21
|
+
|
|
22
|
+
### 1. Flowchart (Diagramas de Flujo)
|
|
23
|
+
|
|
24
|
+
**Uso:** Flujos de proceso, decisiones, workflows
|
|
25
|
+
|
|
26
|
+
````markdown
|
|
27
|
+
```mermaid
|
|
28
|
+
flowchart TD
|
|
29
|
+
A[User Story] --> B{¿Refinada?}
|
|
30
|
+
B -->|No| C[/enrich User Story]
|
|
31
|
+
B -->|Sí| D[/new Crear Propuesta]
|
|
32
|
+
C --> D
|
|
33
|
+
D --> E[/ff Generar con AI]
|
|
34
|
+
E --> F[Revisar y Ajustar]
|
|
35
|
+
F --> G[/apply Implementar]
|
|
36
|
+
G --> H[Desarrollar Código]
|
|
37
|
+
H --> I[/verify Tests + Specs]
|
|
38
|
+
I --> J{¿Tests OK?}
|
|
39
|
+
J -->|No| H
|
|
40
|
+
J -->|Sí| K[/code-review Crear PR]
|
|
41
|
+
K --> L[CodeRabbit Review]
|
|
42
|
+
L --> M{¿Aprobado?}
|
|
43
|
+
M -->|No| H
|
|
44
|
+
M -->|Sí| N[/archive Completar]
|
|
45
|
+
```
|
|
46
|
+
````
|
|
47
|
+
|
|
48
|
+
**Resultado:**
|
|
49
|
+
|
|
50
|
+
```mermaid
|
|
51
|
+
flowchart TD
|
|
52
|
+
A[User Story] --> B{¿Refinada?}
|
|
53
|
+
B -->|No| C[/enrich User Story]
|
|
54
|
+
B -->|Sí| D[/new Crear Propuesta]
|
|
55
|
+
C --> D
|
|
56
|
+
D --> E[/ff Generar con AI]
|
|
57
|
+
E --> F[Revisar y Ajustar]
|
|
58
|
+
F --> G[/apply Implementar]
|
|
59
|
+
G --> H[Desarrollar Código]
|
|
60
|
+
H --> I[/verify Tests + Specs]
|
|
61
|
+
I --> J{¿Tests OK?}
|
|
62
|
+
J -->|No| H
|
|
63
|
+
J -->|Sí| K[/code-review Crear PR]
|
|
64
|
+
K --> L[CodeRabbit Review]
|
|
65
|
+
L --> M{¿Aprobado?}
|
|
66
|
+
M -->|No| H
|
|
67
|
+
M -->|Sí| N[/archive Completar]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 2. Sequence Diagram (Diagramas de Secuencia)
|
|
73
|
+
|
|
74
|
+
**Uso:** Flujos de autenticación, llamadas API, interacciones entre componentes
|
|
75
|
+
|
|
76
|
+
````markdown
|
|
77
|
+
```mermaid
|
|
78
|
+
sequenceDiagram
|
|
79
|
+
participant U as Usuario
|
|
80
|
+
participant C as Cliente (Browser)
|
|
81
|
+
participant A as AuthController
|
|
82
|
+
participant S as AuthService
|
|
83
|
+
participant J as JWTService
|
|
84
|
+
participant DB as Database
|
|
85
|
+
|
|
86
|
+
U->>C: Ingresa email + password
|
|
87
|
+
C->>A: POST /api/v1/auth/login
|
|
88
|
+
A->>S: authenticate(email, password)
|
|
89
|
+
S->>DB: findByEmail(email)
|
|
90
|
+
DB-->>S: User
|
|
91
|
+
S->>S: Hash.check(password, hash)
|
|
92
|
+
S->>J: generateToken(user)
|
|
93
|
+
J-->>S: JWT Token
|
|
94
|
+
S-->>A: {token, user}
|
|
95
|
+
A-->>C: 200 OK {token, user}
|
|
96
|
+
C-->>U: Redirigir a Dashboard
|
|
97
|
+
```
|
|
98
|
+
````
|
|
99
|
+
|
|
100
|
+
**Resultado:**
|
|
101
|
+
|
|
102
|
+
```mermaid
|
|
103
|
+
sequenceDiagram
|
|
104
|
+
participant U as Usuario
|
|
105
|
+
participant C as Cliente (Browser)
|
|
106
|
+
participant A as AuthController
|
|
107
|
+
participant S as AuthService
|
|
108
|
+
participant J as JWTService
|
|
109
|
+
participant DB as Database
|
|
110
|
+
|
|
111
|
+
U->>C: Ingresa email + password
|
|
112
|
+
C->>A: POST /api/v1/auth/login
|
|
113
|
+
A->>S: authenticate(email, password)
|
|
114
|
+
S->>DB: findByEmail(email)
|
|
115
|
+
DB-->>S: User
|
|
116
|
+
S->>S: Hash.check(password, hash)
|
|
117
|
+
S->>J: generateToken(user)
|
|
118
|
+
J-->>S: JWT Token
|
|
119
|
+
S-->>A: {token, user}
|
|
120
|
+
A-->>C: 200 OK {token, user}
|
|
121
|
+
C-->>U: Redirigir a Dashboard
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### 3. Class Diagram (Diagramas de Clases)
|
|
127
|
+
|
|
128
|
+
**Uso:** Arquitectura de componentes, relaciones entre clases
|
|
129
|
+
|
|
130
|
+
````markdown
|
|
131
|
+
```mermaid
|
|
132
|
+
classDiagram
|
|
133
|
+
class AuthController {
|
|
134
|
+
+login(request)
|
|
135
|
+
+logout(request)
|
|
136
|
+
+me(request)
|
|
137
|
+
-validateInput()
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
class AuthService {
|
|
141
|
+
+authenticate(email, password)
|
|
142
|
+
+logout(token)
|
|
143
|
+
-findUser(email)
|
|
144
|
+
-verifyPassword(password, hash)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
class JWTService {
|
|
148
|
+
+generateToken(user, remember)
|
|
149
|
+
+validateToken(token)
|
|
150
|
+
+refreshToken(token)
|
|
151
|
+
+revokeToken(token)
|
|
152
|
+
-loadKeys()
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
class UserRepository {
|
|
156
|
+
+findByEmail(email)
|
|
157
|
+
+findById(id)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
AuthController --> AuthService
|
|
161
|
+
AuthService --> JWTService
|
|
162
|
+
AuthService --> UserRepository
|
|
163
|
+
```
|
|
164
|
+
````
|
|
165
|
+
|
|
166
|
+
**Resultado:**
|
|
167
|
+
|
|
168
|
+
```mermaid
|
|
169
|
+
classDiagram
|
|
170
|
+
class AuthController {
|
|
171
|
+
+login(request)
|
|
172
|
+
+logout(request)
|
|
173
|
+
+me(request)
|
|
174
|
+
-validateInput()
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
class AuthService {
|
|
178
|
+
+authenticate(email, password)
|
|
179
|
+
+logout(token)
|
|
180
|
+
-findUser(email)
|
|
181
|
+
-verifyPassword(password, hash)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
class JWTService {
|
|
185
|
+
+generateToken(user, remember)
|
|
186
|
+
+validateToken(token)
|
|
187
|
+
+refreshToken(token)
|
|
188
|
+
+revokeToken(token)
|
|
189
|
+
-loadKeys()
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
class UserRepository {
|
|
193
|
+
+findByEmail(email)
|
|
194
|
+
+findById(id)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
AuthController --> AuthService
|
|
198
|
+
AuthService --> JWTService
|
|
199
|
+
AuthService --> UserRepository
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### 4. State Diagram (Diagramas de Estado)
|
|
205
|
+
|
|
206
|
+
**Uso:** Ciclo de vida de propuestas, estados de features
|
|
207
|
+
|
|
208
|
+
````markdown
|
|
209
|
+
```mermaid
|
|
210
|
+
stateDiagram-v2
|
|
211
|
+
[*] --> draft: /new
|
|
212
|
+
draft --> review: Completar propuesta
|
|
213
|
+
review --> approved: Aprobada
|
|
214
|
+
review --> rejected: Rechazada
|
|
215
|
+
approved --> in_progress: /apply
|
|
216
|
+
in_progress --> testing: /verify
|
|
217
|
+
testing --> in_progress: Tests fallidos
|
|
218
|
+
testing --> completed: Tests OK + PR merged
|
|
219
|
+
completed --> archived: /archive
|
|
220
|
+
archived --> [*]
|
|
221
|
+
rejected --> [*]
|
|
222
|
+
```
|
|
223
|
+
````
|
|
224
|
+
|
|
225
|
+
**Resultado:**
|
|
226
|
+
|
|
227
|
+
```mermaid
|
|
228
|
+
stateDiagram-v2
|
|
229
|
+
[*] --> draft: /new
|
|
230
|
+
draft --> review: Completar propuesta
|
|
231
|
+
review --> approved: Aprobada
|
|
232
|
+
review --> rejected: Rechazada
|
|
233
|
+
approved --> in_progress: /apply
|
|
234
|
+
in_progress --> testing: /verify
|
|
235
|
+
testing --> in_progress: Tests fallidos
|
|
236
|
+
testing --> completed: Tests OK + PR merged
|
|
237
|
+
completed --> archived: /archive
|
|
238
|
+
archived --> [*]
|
|
239
|
+
rejected --> [*]
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### 5. Entity Relationship Diagram (Diagramas ER)
|
|
245
|
+
|
|
246
|
+
**Uso:** Modelo de datos, relaciones entre tablas
|
|
247
|
+
|
|
248
|
+
````markdown
|
|
249
|
+
```mermaid
|
|
250
|
+
erDiagram
|
|
251
|
+
USERS ||--o{ LOGIN_ATTEMPTS : has
|
|
252
|
+
USERS {
|
|
253
|
+
bigint id PK
|
|
254
|
+
string email UK
|
|
255
|
+
string password_hash
|
|
256
|
+
timestamp created_at
|
|
257
|
+
timestamp updated_at
|
|
258
|
+
}
|
|
259
|
+
LOGIN_ATTEMPTS {
|
|
260
|
+
bigint id PK
|
|
261
|
+
string email
|
|
262
|
+
string ip_address
|
|
263
|
+
text user_agent
|
|
264
|
+
boolean success
|
|
265
|
+
timestamp attempted_at
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
````
|
|
269
|
+
|
|
270
|
+
**Resultado:**
|
|
271
|
+
|
|
272
|
+
```mermaid
|
|
273
|
+
erDiagram
|
|
274
|
+
USERS ||--o{ LOGIN_ATTEMPTS : has
|
|
275
|
+
USERS {
|
|
276
|
+
bigint id PK
|
|
277
|
+
string email UK
|
|
278
|
+
string password_hash
|
|
279
|
+
timestamp created_at
|
|
280
|
+
timestamp updated_at
|
|
281
|
+
}
|
|
282
|
+
LOGIN_ATTEMPTS {
|
|
283
|
+
bigint id PK
|
|
284
|
+
string email
|
|
285
|
+
string ip_address
|
|
286
|
+
text user_agent
|
|
287
|
+
boolean success
|
|
288
|
+
timestamp attempted_at
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
### 6. Gantt Chart (Cronogramas)
|
|
295
|
+
|
|
296
|
+
**Uso:** Planificación de tareas, sprints
|
|
297
|
+
|
|
298
|
+
````markdown
|
|
299
|
+
```mermaid
|
|
300
|
+
gantt
|
|
301
|
+
title Implementación CHANGE-001
|
|
302
|
+
dateFormat YYYY-MM-DD
|
|
303
|
+
section Setup
|
|
304
|
+
Migración DB :done, task1, 2026-02-01, 1d
|
|
305
|
+
Claves RSA :done, task2, 2026-02-01, 1d
|
|
306
|
+
section Backend
|
|
307
|
+
UserRepository :done, task3, 2026-02-02, 2d
|
|
308
|
+
JWTService :done, task4, 2026-02-02, 3d
|
|
309
|
+
AuthService :done, task5, 2026-02-05, 3d
|
|
310
|
+
RateLimitMiddleware :done, task6, 2026-02-06, 2d
|
|
311
|
+
AuthController :done, task7, 2026-02-08, 3d
|
|
312
|
+
section Testing
|
|
313
|
+
Unit Tests :done, task8, 2026-02-10, 2d
|
|
314
|
+
Integration Tests :done, task9, 2026-02-11, 2d
|
|
315
|
+
section Docs
|
|
316
|
+
API Documentation :done, task10, 2026-02-12, 1d
|
|
317
|
+
```
|
|
318
|
+
````
|
|
319
|
+
|
|
320
|
+
**Resultado:**
|
|
321
|
+
|
|
322
|
+
```mermaid
|
|
323
|
+
gantt
|
|
324
|
+
title Implementación CHANGE-001
|
|
325
|
+
dateFormat YYYY-MM-DD
|
|
326
|
+
section Setup
|
|
327
|
+
Migración DB :done, task1, 2026-02-01, 1d
|
|
328
|
+
Claves RSA :done, task2, 2026-02-01, 1d
|
|
329
|
+
section Backend
|
|
330
|
+
UserRepository :done, task3, 2026-02-02, 2d
|
|
331
|
+
JWTService :done, task4, 2026-02-02, 3d
|
|
332
|
+
AuthService :done, task5, 2026-02-05, 3d
|
|
333
|
+
RateLimitMiddleware :done, task6, 2026-02-06, 2d
|
|
334
|
+
AuthController :done, task7, 2026-02-08, 3d
|
|
335
|
+
section Testing
|
|
336
|
+
Unit Tests :done, task8, 2026-02-10, 2d
|
|
337
|
+
Integration Tests :done, task9, 2026-02-11, 2d
|
|
338
|
+
section Docs
|
|
339
|
+
API Documentation :done, task10, 2026-02-12, 1d
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## 🎨 Temas de Color
|
|
345
|
+
|
|
346
|
+
Mermaid soporta diferentes temas:
|
|
347
|
+
|
|
348
|
+
### Tema Default (Claro)
|
|
349
|
+
```mermaid
|
|
350
|
+
%%{init: {'theme':'default'}}%%
|
|
351
|
+
graph LR
|
|
352
|
+
A[Inicio] --> B[Proceso]
|
|
353
|
+
B --> C[Fin]
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Tema Dark
|
|
357
|
+
```mermaid
|
|
358
|
+
%%{init: {'theme':'dark'}}%%
|
|
359
|
+
graph LR
|
|
360
|
+
A[Inicio] --> B[Proceso]
|
|
361
|
+
B --> C[Fin]
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Tema Forest (Verde)
|
|
365
|
+
```mermaid
|
|
366
|
+
%%{init: {'theme':'forest'}}%%
|
|
367
|
+
graph LR
|
|
368
|
+
A[Inicio] --> B[Proceso]
|
|
369
|
+
B --> C[Fin]
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## 📝 Uso Recomendado en SpecLeap
|
|
375
|
+
|
|
376
|
+
### En proposal.md
|
|
377
|
+
```markdown
|
|
378
|
+
## Flujo de Usuario
|
|
379
|
+
|
|
380
|
+
```mermaid
|
|
381
|
+
flowchart TD
|
|
382
|
+
Start[Usuario abre app] --> Login[Pantalla de login]
|
|
383
|
+
Login --> Submit[Enviar credenciales]
|
|
384
|
+
Submit --> Valid{¿Credenciales válidas?}
|
|
385
|
+
Valid -->|Sí| Dashboard[Dashboard]
|
|
386
|
+
Valid -->|No| Error[Mostrar error]
|
|
387
|
+
Error --> Login
|
|
388
|
+
`` `
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### En design.md
|
|
392
|
+
```markdown
|
|
393
|
+
## Arquitectura de Componentes
|
|
394
|
+
|
|
395
|
+
```mermaid
|
|
396
|
+
classDiagram
|
|
397
|
+
Controller --> Service
|
|
398
|
+
Service --> Repository
|
|
399
|
+
Service --> ExternalAPI
|
|
400
|
+
`` `
|
|
401
|
+
|
|
402
|
+
## Secuencia de Login
|
|
403
|
+
|
|
404
|
+
```mermaid
|
|
405
|
+
sequenceDiagram
|
|
406
|
+
Cliente->>API: POST /login
|
|
407
|
+
API->>DB: Validar credenciales
|
|
408
|
+
DB-->>API: User found
|
|
409
|
+
API-->>Cliente: Token JWT
|
|
410
|
+
`` `
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### En tasks.md
|
|
414
|
+
```markdown
|
|
415
|
+
## Dependencias entre Tareas
|
|
416
|
+
|
|
417
|
+
```mermaid
|
|
418
|
+
graph TD
|
|
419
|
+
T001[TASK-001: Setup] --> T002[TASK-002: Backend]
|
|
420
|
+
T001 --> T003[TASK-003: Frontend]
|
|
421
|
+
T002 --> T004[TASK-004: Tests]
|
|
422
|
+
T003 --> T004
|
|
423
|
+
T004 --> T005[TASK-005: Docs]
|
|
424
|
+
`` `
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## 🔧 Cómo Ver los Diagramas
|
|
430
|
+
|
|
431
|
+
### En VSCode Local
|
|
432
|
+
1. Abrir archivo `.md` con diagramas Mermaid
|
|
433
|
+
2. `Cmd+K V` para preview
|
|
434
|
+
3. Los diagramas se renderizan automáticamente
|
|
435
|
+
|
|
436
|
+
### En Cursor / Continue
|
|
437
|
+
1. Abrir archivo `.md` con diagramas Mermaid
|
|
438
|
+
2. Abrir preview con el atajo correspondiente
|
|
439
|
+
3. Los diagramas se renderizan automáticamente
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## 🐛 Troubleshooting
|
|
444
|
+
|
|
445
|
+
### Diagrama no se renderiza en VSCode
|
|
446
|
+
|
|
447
|
+
**Solución 1:** Instalar Markdown Preview Enhanced
|
|
448
|
+
```bash
|
|
449
|
+
code --install-extension shd101wyy.markdown-preview-enhanced
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Solución 2:** Reload window
|
|
453
|
+
`Cmd+Shift+P` → "Reload Window"
|
|
454
|
+
|
|
455
|
+
### Diagrama muestra error de sintaxis
|
|
456
|
+
|
|
457
|
+
**Revisar:**
|
|
458
|
+
- ` ```mermaid ` debe estar en su propia línea
|
|
459
|
+
- Cierre con ` ``` ` en su propia línea
|
|
460
|
+
- Sintaxis correcta según tipo de diagrama
|
|
461
|
+
- Sin espacios extra antes de la etiqueta
|
|
462
|
+
|
|
463
|
+
### Diagrama se ve feo
|
|
464
|
+
|
|
465
|
+
**Ajustar tema:**
|
|
466
|
+
```mermaid
|
|
467
|
+
%%{init: {'theme':'default'}}%%
|
|
468
|
+
graph TD
|
|
469
|
+
A --> B
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## 📚 Referencias
|
|
475
|
+
|
|
476
|
+
- [Mermaid Documentation](https://mermaid.js.org/)
|
|
477
|
+
- [Mermaid Live Editor](https://mermaid.live/) — Probar diagramas online
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
**Última actualización:** 2026-02-12
|