elsabro 2.0.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.
Files changed (58) hide show
  1. package/README.md +268 -0
  2. package/agents/elsabro-analyst.md +176 -0
  3. package/agents/elsabro-debugger.md +293 -0
  4. package/agents/elsabro-executor.md +477 -0
  5. package/agents/elsabro-orchestrator.md +426 -0
  6. package/agents/elsabro-planner.md +278 -0
  7. package/agents/elsabro-qa.md +273 -0
  8. package/agents/elsabro-quick-dev.md +309 -0
  9. package/agents/elsabro-scrum-master.md +217 -0
  10. package/agents/elsabro-tech-writer.md +347 -0
  11. package/agents/elsabro-ux-designer.md +278 -0
  12. package/agents/elsabro-verifier.md +295 -0
  13. package/agents/elsabro-yolo-dev.md +322 -0
  14. package/bin/install.js +497 -0
  15. package/commands/elsabro/add-phase.md +114 -0
  16. package/commands/elsabro/add-todo.md +158 -0
  17. package/commands/elsabro/audit-milestone.md +147 -0
  18. package/commands/elsabro/check-todos.md +192 -0
  19. package/commands/elsabro/complete-milestone.md +138 -0
  20. package/commands/elsabro/debug.md +153 -0
  21. package/commands/elsabro/discuss-phase.md +160 -0
  22. package/commands/elsabro/execute.md +299 -0
  23. package/commands/elsabro/help.md +102 -0
  24. package/commands/elsabro/insert-phase.md +117 -0
  25. package/commands/elsabro/list-phase-assumptions.md +129 -0
  26. package/commands/elsabro/map-codebase.md +108 -0
  27. package/commands/elsabro/new-milestone.md +128 -0
  28. package/commands/elsabro/new.md +230 -0
  29. package/commands/elsabro/pause-work.md +261 -0
  30. package/commands/elsabro/plan-milestone-gaps.md +129 -0
  31. package/commands/elsabro/plan.md +272 -0
  32. package/commands/elsabro/progress.md +187 -0
  33. package/commands/elsabro/quick.md +99 -0
  34. package/commands/elsabro/remove-phase.md +136 -0
  35. package/commands/elsabro/research-phase.md +174 -0
  36. package/commands/elsabro/resume-work.md +288 -0
  37. package/commands/elsabro/set-profile.md +216 -0
  38. package/commands/elsabro/settings.md +185 -0
  39. package/commands/elsabro/start.md +204 -0
  40. package/commands/elsabro/update.md +71 -0
  41. package/commands/elsabro/verify-work.md +269 -0
  42. package/commands/elsabro/verify.md +207 -0
  43. package/hooks/dist/.gitkeep +2 -0
  44. package/package.json +45 -0
  45. package/references/error-handling-instructions.md +312 -0
  46. package/references/source-hierarchy.md +150 -0
  47. package/references/token-optimization.md +225 -0
  48. package/skills/api-setup.md +315 -0
  49. package/skills/auth-setup.md +180 -0
  50. package/skills/database-setup.md +238 -0
  51. package/skills/expo-app.md +261 -0
  52. package/skills/nextjs-app.md +206 -0
  53. package/skills/payments-setup.md +421 -0
  54. package/skills/sentry-setup.md +295 -0
  55. package/templates/error-handling-config.json +138 -0
  56. package/templates/session-state.json +69 -0
  57. package/templates/starters/.gitkeep +2 -0
  58. package/workflows/.gitkeep +2 -0
@@ -0,0 +1,295 @@
1
+ ---
2
+ name: sentry-setup
3
+ description: Skill para integrar Sentry (monitoreo de errores) en cualquier proyecto. Usa este skill cuando el usuario quiere detectar errores en producción.
4
+ ---
5
+
6
+ # Skill: Integrar Sentry
7
+
8
+ <when_to_use>
9
+ Usar cuando el usuario menciona:
10
+ - "monitoreo de errores"
11
+ - "detectar bugs"
12
+ - "errores en producción"
13
+ - "crash reporting"
14
+ - "sentry"
15
+ - "tracking de errores"
16
+ </when_to_use>
17
+
18
+ <before_starting>
19
+ ## Investigación Obligatoria
20
+
21
+ **ANTES de instalar, detectar tipo de proyecto y buscar setup actual:**
22
+
23
+ ```
24
+ 1. Detectar proyecto:
25
+ - ¿Tiene package.json? → Node.js
26
+ - ¿Tiene next.config? → Next.js
27
+ - ¿Tiene app.json con expo? → Expo/React Native
28
+ - ¿Tiene requirements.txt? → Python
29
+
30
+ 2. Resolver Sentry para el tipo:
31
+ mcp__plugin_context7_context7__resolve-library-id("sentry [tipo]")
32
+
33
+ Ejemplos:
34
+ - "sentry nextjs"
35
+ - "sentry expo"
36
+ - "sentry react"
37
+ - "sentry node"
38
+
39
+ 3. Buscar setup actual:
40
+ mcp__plugin_context7_context7__query-docs(id, "installation configuration")
41
+ ```
42
+ </before_starting>
43
+
44
+ <setup_by_project_type>
45
+ ## Setup por Tipo de Proyecto
46
+
47
+ ### Next.js
48
+
49
+ ```bash
50
+ # 1. Instalar (VERIFICAR versión con Context7)
51
+ npx @sentry/wizard@latest -i nextjs
52
+
53
+ # 2. El wizard crea automáticamente:
54
+ # - sentry.client.config.ts
55
+ # - sentry.server.config.ts
56
+ # - sentry.edge.config.ts
57
+ # - Actualiza next.config.js
58
+ ```
59
+
60
+ ### Expo/React Native
61
+
62
+ ```bash
63
+ # 1. Instalar (VERIFICAR con Context7)
64
+ npx expo install @sentry/react-native
65
+
66
+ # 2. Configurar en app.json
67
+ # VERIFICAR estructura actual con Context7
68
+ ```
69
+
70
+ ### React (Vite/CRA)
71
+
72
+ ```bash
73
+ # 1. Instalar (VERIFICAR con Context7)
74
+ npm install @sentry/react
75
+
76
+ # 2. Inicializar en main.tsx/index.tsx
77
+ # VERIFICAR patrón actual con Context7
78
+ ```
79
+
80
+ ### Node.js/Express
81
+
82
+ ```bash
83
+ # 1. Instalar (VERIFICAR con Context7)
84
+ npm install @sentry/node
85
+
86
+ # 2. Inicializar al inicio del servidor
87
+ # VERIFICAR patrón actual con Context7
88
+ ```
89
+ </setup_by_project_type>
90
+
91
+ <configuration>
92
+ ## Configuración Común
93
+
94
+ ### Variables de Entorno
95
+ ```bash
96
+ # .env.local (NO commitear)
97
+ SENTRY_DSN=https://xxxxx@xxx.ingest.sentry.io/xxxxx
98
+
99
+ # Para Next.js también:
100
+ SENTRY_AUTH_TOKEN=sntrys_xxxxx
101
+ ```
102
+
103
+ ### DSN
104
+ El DSN (Data Source Name) se obtiene de:
105
+ 1. Ir a https://sentry.io
106
+ 2. Crear proyecto o seleccionar existente
107
+ 3. Settings → Client Keys (DSN)
108
+
109
+ ### Opciones Importantes
110
+ ```typescript
111
+ // VERIFICAR opciones actuales con Context7
112
+ Sentry.init({
113
+ dsn: process.env.SENTRY_DSN,
114
+
115
+ // Porcentaje de transacciones a trackear (performance)
116
+ tracesSampleRate: 1.0, // 100% en dev, reducir en prod
117
+
118
+ // Porcentaje de errores a trackear
119
+ sampleRate: 1.0,
120
+
121
+ // Ambiente
122
+ environment: process.env.NODE_ENV,
123
+
124
+ // Release (para source maps)
125
+ release: process.env.npm_package_version,
126
+ });
127
+ ```
128
+ </configuration>
129
+
130
+ <verification>
131
+ ## Verificación
132
+
133
+ ### Paso 1: Verificar instalación
134
+ ```bash
135
+ # Ver que las dependencias están instaladas
136
+ npm ls | grep sentry
137
+ ```
138
+
139
+ ### Paso 2: Probar que reporta errores
140
+ ```typescript
141
+ // Agregar temporalmente en algún lugar
142
+ throw new Error("Test Sentry Error");
143
+
144
+ // O usar el método oficial:
145
+ Sentry.captureException(new Error("Test error"));
146
+ ```
147
+
148
+ ### Paso 3: Verificar en Sentry Dashboard
149
+ 1. Ir a https://sentry.io
150
+ 2. Seleccionar tu proyecto
151
+ 3. Ir a "Issues"
152
+ 4. Debería aparecer el error de prueba
153
+
154
+ ### Paso 4: Limpiar
155
+ - Eliminar el error de prueba del código
156
+ </verification>
157
+
158
+ <user_testing>
159
+ ## Guía de Prueba para Usuario
160
+
161
+ ```
162
+ Para ti (Usuario):
163
+
164
+ 1. Ve a https://sentry.io e inicia sesión
165
+
166
+ 2. Selecciona tu proyecto (o créalo si no existe)
167
+
168
+ 3. Ve a "Issues" en el menú lateral
169
+
170
+ 4. ¿Ves el error de prueba "Test Sentry Error"?
171
+ - SÍ → Sentry está funcionando correctamente
172
+ - NO → Espera 1-2 minutos y recarga (puede haber delay)
173
+
174
+ 5. Si después de 2 minutos no aparece:
175
+ - Verifica que el DSN es correcto
176
+ - Verifica que la app está corriendo
177
+ - Dime qué ves en la consola
178
+ ```
179
+ </user_testing>
180
+
181
+ <error_boundary>
182
+ ## Error Boundary (React/Next.js)
183
+
184
+ Para capturar errores de UI:
185
+
186
+ ```tsx
187
+ // components/ErrorBoundary.tsx
188
+ // VERIFICAR patrón actual con Context7
189
+
190
+ 'use client';
191
+
192
+ import * as Sentry from '@sentry/nextjs';
193
+ import { Component, ReactNode } from 'react';
194
+
195
+ interface Props {
196
+ children: ReactNode;
197
+ fallback?: ReactNode;
198
+ }
199
+
200
+ interface State {
201
+ hasError: boolean;
202
+ }
203
+
204
+ export class ErrorBoundary extends Component<Props, State> {
205
+ constructor(props: Props) {
206
+ super(props);
207
+ this.state = { hasError: false };
208
+ }
209
+
210
+ static getDerivedStateFromError() {
211
+ return { hasError: true };
212
+ }
213
+
214
+ componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
215
+ Sentry.captureException(error, { extra: errorInfo });
216
+ }
217
+
218
+ render() {
219
+ if (this.state.hasError) {
220
+ return this.props.fallback || <div>Algo salió mal</div>;
221
+ }
222
+ return this.props.children;
223
+ }
224
+ }
225
+ ```
226
+
227
+ Uso:
228
+ ```tsx
229
+ // app/layout.tsx
230
+ <ErrorBoundary fallback={<ErrorPage />}>
231
+ {children}
232
+ </ErrorBoundary>
233
+ ```
234
+ </error_boundary>
235
+
236
+ <common_issues>
237
+ ## Problemas Comunes
238
+
239
+ ### "Events not showing in Sentry"
240
+ - Verificar DSN es correcto
241
+ - Verificar que la app está corriendo
242
+ - Verificar que no hay adblocker bloqueando
243
+ - Esperar 1-2 minutos (hay delay)
244
+
245
+ ### "Source maps not working"
246
+ - Verificar SENTRY_AUTH_TOKEN
247
+ - Verificar configuración de releases
248
+ - Ejecutar build con source maps habilitados
249
+
250
+ ### "Too many events"
251
+ - Reducir tracesSampleRate
252
+ - Configurar filtering de errores conocidos
253
+ - Usar beforeSend para filtrar
254
+
255
+ ### "Performance monitoring slow"
256
+ - Reducir tracesSampleRate a 0.1 (10%)
257
+ - Configurar sampling por tipo de transacción
258
+ </common_issues>
259
+
260
+ <best_practices>
261
+ ## Mejores Prácticas
262
+
263
+ 1. **Nunca commitear DSN en código**
264
+ - Usar variables de entorno
265
+
266
+ 2. **Configurar releases**
267
+ - Para ver en qué versión ocurrió el error
268
+
269
+ 3. **Agregar contexto**
270
+ ```typescript
271
+ Sentry.setUser({ id: userId, email: userEmail });
272
+ Sentry.setContext("feature", { name: "checkout" });
273
+ ```
274
+
275
+ 4. **Configurar alertas**
276
+ - En Sentry Dashboard: Alerts → Create Alert Rule
277
+ - Notificar por email/Slack cuando hay errores nuevos
278
+
279
+ 5. **Revisar errores regularmente**
280
+ - Al menos una vez por semana
281
+ - Priorizar errores que afectan a muchos usuarios
282
+ </best_practices>
283
+
284
+ <next_steps>
285
+ ## Después del Setup
286
+
287
+ Una vez que Sentry está funcionando:
288
+
289
+ 1. Configurar alertas en el dashboard de Sentry
290
+ 2. Agregar tags de usuario para debugging
291
+ 3. Configurar source maps para ver código real
292
+ 4. Reducir sample rates para producción
293
+
294
+ Continuar con `/elsabro:plan` para la siguiente feature.
295
+ </next_steps>
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0",
4
+ "description": "ELSABRO Error Handling Configuration",
5
+
6
+ "severityLevels": {
7
+ "CRITICAL": {
8
+ "emoji": "🔴",
9
+ "canContinue": false,
10
+ "requiresApproval": true,
11
+ "description": "Error fatal - debe parar inmediatamente",
12
+ "examples": [
13
+ "SESSION.md corrupto o faltante",
14
+ "Dependencias incompatibles",
15
+ "Archivos de configuración inválidos"
16
+ ]
17
+ },
18
+ "HIGH": {
19
+ "emoji": "🟠",
20
+ "canContinue": true,
21
+ "requiresApproval": true,
22
+ "description": "Error importante - debería parar, puede forzar continuar",
23
+ "examples": [
24
+ "Tests fallando",
25
+ "Build fallido",
26
+ "Validación de schema falló"
27
+ ]
28
+ },
29
+ "MEDIUM": {
30
+ "emoji": "🟡",
31
+ "canContinue": true,
32
+ "requiresApproval": false,
33
+ "description": "Warning - puede continuar con precaución",
34
+ "examples": [
35
+ "Lint warnings",
36
+ "Deprecation warnings",
37
+ "Coverage bajo pero aceptable"
38
+ ]
39
+ },
40
+ "LOW": {
41
+ "emoji": "⬜",
42
+ "canContinue": true,
43
+ "requiresApproval": false,
44
+ "description": "Informativo - continuar normal",
45
+ "examples": [
46
+ "Info messages",
47
+ "Retry exitoso después de fallo",
48
+ "Task completado con warnings menores"
49
+ ]
50
+ }
51
+ },
52
+
53
+ "parallelPolicies": {
54
+ "fail_fast": {
55
+ "description": "Para todo si cualquier agente falla",
56
+ "useWhen": "Todos los resultados son críticos (deploy, tests críticos)",
57
+ "behavior": {
58
+ "onFirstFailure": "stop_all",
59
+ "waitForRunning": false,
60
+ "rollbackOnFailure": true
61
+ }
62
+ },
63
+ "quorum": {
64
+ "description": "Continúa si >50% de agentes tienen éxito",
65
+ "useWhen": "Resultados parciales son útiles (exploración, research)",
66
+ "behavior": {
67
+ "onFirstFailure": "continue",
68
+ "waitForRunning": true,
69
+ "successThreshold": 0.5
70
+ }
71
+ },
72
+ "continue_all": {
73
+ "description": "Continúa siempre, reporta fallos al final",
74
+ "useWhen": "Todos los agentes son independientes",
75
+ "behavior": {
76
+ "onFirstFailure": "continue",
77
+ "waitForRunning": true,
78
+ "successThreshold": 0
79
+ }
80
+ },
81
+ "critical_path": {
82
+ "description": "Para solo si falla un agente marcado como crítico",
83
+ "useWhen": "Algunos agentes son críticos, otros opcionales",
84
+ "behavior": {
85
+ "onFirstFailure": "check_criticality",
86
+ "waitForRunning": true,
87
+ "criticalAgents": []
88
+ }
89
+ }
90
+ },
91
+
92
+ "retryDefaults": {
93
+ "maxAttempts": 3,
94
+ "baseDelayMs": 1000,
95
+ "maxDelayMs": 10000,
96
+ "backoffMultiplier": 2,
97
+ "timeoutPerAttemptMs": 30000,
98
+ "totalTimeoutMs": 120000
99
+ },
100
+
101
+ "errorPatterns": {
102
+ "SESSION_MISSING": {
103
+ "pattern": "SESSION.md not found|No session file",
104
+ "severity": "CRITICAL",
105
+ "suggestedAction": "/elsabro:start para iniciar nueva sesión"
106
+ },
107
+ "TESTS_FAILED": {
108
+ "pattern": "test.*fail|FAIL.*test|npm test.*exit code 1",
109
+ "severity": "HIGH",
110
+ "suggestedAction": "/elsabro:debug para investigar fallos"
111
+ },
112
+ "BUILD_FAILED": {
113
+ "pattern": "build.*fail|compilation.*error|tsc.*error",
114
+ "severity": "HIGH",
115
+ "suggestedAction": "Revisar errores de compilación"
116
+ },
117
+ "LINT_WARNINGS": {
118
+ "pattern": "warning.*lint|eslint.*warning",
119
+ "severity": "MEDIUM",
120
+ "suggestedAction": "Considerar arreglar warnings antes de commit"
121
+ },
122
+ "DEPENDENCY_MISSING": {
123
+ "pattern": "Cannot find module|Module not found",
124
+ "severity": "HIGH",
125
+ "suggestedAction": "npm install para instalar dependencias"
126
+ },
127
+ "GIT_CONFLICT": {
128
+ "pattern": "CONFLICT|merge conflict|Automatic merge failed",
129
+ "severity": "HIGH",
130
+ "suggestedAction": "Resolver conflictos manualmente"
131
+ },
132
+ "TIMEOUT": {
133
+ "pattern": "timeout|timed out|ETIMEDOUT",
134
+ "severity": "HIGH",
135
+ "suggestedAction": "Reintentar o verificar conectividad"
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "description": "Template para .planning/SESSION-STATE.json",
4
+
5
+ "template": {
6
+ "version": "1.0",
7
+ "createdAt": "",
8
+ "lastUpdated": "",
9
+ "status": "active",
10
+
11
+ "context": {
12
+ "milestone": "",
13
+ "phase": "",
14
+ "progress": 0,
15
+ "currentTask": ""
16
+ },
17
+
18
+ "checkpoints": [
19
+ {
20
+ "name": "",
21
+ "completedAt": "",
22
+ "artifacts": []
23
+ }
24
+ ],
25
+
26
+ "git": {
27
+ "branch": "",
28
+ "lastCommit": "",
29
+ "uncommittedFiles": 0
30
+ },
31
+
32
+ "errors": {
33
+ "count": 0,
34
+ "lastError": null,
35
+ "warnings": []
36
+ },
37
+
38
+ "parallelExecution": {
39
+ "policy": "quorum",
40
+ "activeAgents": [],
41
+ "completedAgents": [],
42
+ "failedAgents": []
43
+ },
44
+
45
+ "retry": {
46
+ "currentAttempt": 0,
47
+ "maxAttempts": 3,
48
+ "lastAttemptAt": null,
49
+ "totalTimeSpentMs": 0
50
+ },
51
+
52
+ "recovery": {
53
+ "lastSuccessfulStep": "",
54
+ "resumeFrom": "",
55
+ "notes": ""
56
+ }
57
+ },
58
+
59
+ "validation": {
60
+ "requiredFields": [
61
+ "version",
62
+ "createdAt",
63
+ "status",
64
+ "context.milestone"
65
+ ],
66
+ "stalenessWarningDays": 7,
67
+ "stalenessErrorDays": 30
68
+ }
69
+ }
@@ -0,0 +1,2 @@
1
+ # Starter templates will be added here
2
+ # Each subdirectory contains a project starter template
@@ -0,0 +1,2 @@
1
+ # Workflow definitions will be added here
2
+ # Workflows are multi-step processes that can be executed