elsabro 2.2.0 → 3.7.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 +668 -20
- package/agents/elsabro-orchestrator.md +113 -0
- package/bin/install.js +0 -0
- package/commands/elsabro/execute.md +223 -46
- package/commands/elsabro/start.md +34 -0
- package/commands/elsabro/verify-work.md +29 -0
- package/flows/development-flow.json +452 -0
- package/flows/quick-flow.json +118 -0
- package/hooks/confirm-destructive.sh +145 -0
- package/hooks/hooks-config.json +81 -0
- package/hooks/lint-check.sh +238 -0
- package/hooks/post-edit-test.sh +189 -0
- package/package.json +5 -3
- package/references/SYSTEM_INDEX.md +379 -5
- package/references/agent-marketplace.md +2274 -0
- package/references/agent-protocol.md +1126 -0
- package/references/ai-code-suggestions.md +2413 -0
- package/references/checkpointing.md +595 -0
- package/references/collaboration-patterns.md +851 -0
- package/references/collaborative-sessions.md +1081 -0
- package/references/configuration-management.md +1810 -0
- package/references/cost-tracking.md +1095 -0
- package/references/enterprise-sso.md +2001 -0
- package/references/error-contracts-tests.md +1171 -0
- package/references/error-contracts-v2.md +968 -0
- package/references/error-contracts.md +3102 -0
- package/references/event-driven.md +1031 -0
- package/references/flow-orchestration.md +940 -0
- package/references/flow-visualization.md +1557 -0
- package/references/ide-integrations.md +3513 -0
- package/references/interrupt-system.md +681 -0
- package/references/kubernetes-deployment.md +3099 -0
- package/references/memory-system.md +683 -0
- package/references/mobile-companion.md +3236 -0
- package/references/multi-llm-providers.md +2494 -0
- package/references/multi-project-memory.md +1182 -0
- package/references/observability.md +793 -0
- package/references/output-schemas.md +858 -0
- package/references/parallel-worktrees.md +293 -0
- package/references/performance-profiler.md +955 -0
- package/references/plugin-system.md +1526 -0
- package/references/prompt-management.md +292 -0
- package/references/sandbox-execution.md +303 -0
- package/references/security-system.md +1253 -0
- package/references/streaming.md +696 -0
- package/references/testing-framework.md +1151 -0
- package/references/time-travel.md +802 -0
- package/references/tool-registry.md +886 -0
- package/references/voice-commands.md +3296 -0
- package/scripts/setup-parallel-worktrees.sh +319 -0
- package/skills/memory-update.md +207 -0
- package/skills/review.md +331 -0
- package/skills/techdebt.md +289 -0
- package/skills/tutor.md +219 -0
- package/templates/.planning/notes/.gitkeep +0 -0
- package/templates/CLAUDE.md.template +48 -0
- package/templates/agent-marketplace-config.json +220 -0
- package/templates/agent-protocol-config.json +136 -0
- package/templates/ai-suggestions-config.json +100 -0
- package/templates/checkpoint-state.json +61 -0
- package/templates/collaboration-config.json +157 -0
- package/templates/collaborative-sessions-config.json +153 -0
- package/templates/configuration-config.json +245 -0
- package/templates/cost-tracking-config.json +148 -0
- package/templates/enterprise-sso-config.json +438 -0
- package/templates/error-handling-config.json +79 -2
- package/templates/events-config.json +148 -0
- package/templates/flow-visualization-config.json +196 -0
- package/templates/ide-integrations-config.json +442 -0
- package/templates/kubernetes-config.json +764 -0
- package/templates/memory-state.json +84 -0
- package/templates/mistakes.md.template +52 -0
- package/templates/mobile-companion-config.json +600 -0
- package/templates/multi-llm-config.json +544 -0
- package/templates/multi-project-memory-config.json +145 -0
- package/templates/observability-config.json +109 -0
- package/templates/patterns.md.template +114 -0
- package/templates/performance-profiler-config.json +125 -0
- package/templates/plugin-config.json +170 -0
- package/templates/prompt-management-config.json +86 -0
- package/templates/sandbox-config.json +185 -0
- package/templates/schemas-config.json +65 -0
- package/templates/security-config.json +120 -0
- package/templates/streaming-config.json +72 -0
- package/templates/testing-config.json +81 -0
- package/templates/timetravel-config.json +62 -0
- package/templates/tool-registry-config.json +109 -0
- package/templates/voice-commands-config.json +658 -0
package/skills/review.md
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Code review profesional estilo Staff Engineer - correctness, security, performance
|
|
4
|
+
trigger: /elsabro:review
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
- Task
|
|
11
|
+
argument-hint: "[--staged|--pr|file] - scope del review"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# ELSABRO: Code Review
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
Realizar code review profesional como un Staff Engineer antes de commits o PRs.
|
|
18
|
+
Detectar issues de correctness, security, performance, maintainability y testing.
|
|
19
|
+
Generar reporte estructurado compatible con flujo ELSABRO.
|
|
20
|
+
</objective>
|
|
21
|
+
|
|
22
|
+
<task_integration>
|
|
23
|
+
## Integracion con Tasks API
|
|
24
|
+
|
|
25
|
+
Al iniciar review:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
TaskCreate:
|
|
29
|
+
description: "Code review: [scope]"
|
|
30
|
+
status: in_progress
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Actualizar con issues encontrados por categoria.
|
|
34
|
+
Al finalizar, incluir veredicto y checklist.
|
|
35
|
+
</task_integration>
|
|
36
|
+
|
|
37
|
+
<triggers>
|
|
38
|
+
## Triggers
|
|
39
|
+
|
|
40
|
+
- `/elsabro:review` - Review de cambios actuales (staged + unstaged)
|
|
41
|
+
- `/elsabro:review --staged` - Solo cambios staged
|
|
42
|
+
- `/elsabro:review --pr` - Review completo estilo PR
|
|
43
|
+
- `/elsabro:review [file]` - Review de archivo especifico
|
|
44
|
+
- `/elsabro:review --save` - Guardar reporte en .planning/REVIEW.md
|
|
45
|
+
</triggers>
|
|
46
|
+
|
|
47
|
+
<checklist>
|
|
48
|
+
## Review Checklist
|
|
49
|
+
|
|
50
|
+
### 1. Correctness
|
|
51
|
+
- [ ] El codigo hace lo que deberia hacer?
|
|
52
|
+
- [ ] Maneja edge cases?
|
|
53
|
+
- [ ] Hay off-by-one errors?
|
|
54
|
+
- [ ] Las condiciones son correctas (< vs <=)?
|
|
55
|
+
- [ ] Null/undefined handling?
|
|
56
|
+
|
|
57
|
+
### 2. Security
|
|
58
|
+
- [ ] Hay inputs no sanitizados?
|
|
59
|
+
- [ ] Se exponen datos sensibles?
|
|
60
|
+
- [ ] SQL injection posible?
|
|
61
|
+
- [ ] XSS posible?
|
|
62
|
+
- [ ] Secrets hardcodeados?
|
|
63
|
+
- [ ] Validacion de permisos?
|
|
64
|
+
|
|
65
|
+
### 3. Performance
|
|
66
|
+
- [ ] Hay N+1 queries?
|
|
67
|
+
- [ ] Renders innecesarios en React?
|
|
68
|
+
- [ ] Loops dentro de loops evitables?
|
|
69
|
+
- [ ] Memory leaks (event listeners, subscriptions)?
|
|
70
|
+
- [ ] Operaciones bloqueantes?
|
|
71
|
+
|
|
72
|
+
### 4. Maintainability
|
|
73
|
+
- [ ] Codigo legible y auto-documentado?
|
|
74
|
+
- [ ] Nombres descriptivos?
|
|
75
|
+
- [ ] Funciones pequenas y enfocadas?
|
|
76
|
+
- [ ] DRY - no hay duplicacion?
|
|
77
|
+
- [ ] Principio de responsabilidad unica?
|
|
78
|
+
|
|
79
|
+
### 5. Testing
|
|
80
|
+
- [ ] Hay tests para el nuevo codigo?
|
|
81
|
+
- [ ] Los tests son significativos?
|
|
82
|
+
- [ ] Cubren edge cases?
|
|
83
|
+
- [ ] Mocks apropiados?
|
|
84
|
+
|
|
85
|
+
### 6. Project Conventions
|
|
86
|
+
- [ ] Sigue el estilo del proyecto?
|
|
87
|
+
- [ ] Respeta patterns de CLAUDE.md?
|
|
88
|
+
- [ ] No repite errores de mistakes.md?
|
|
89
|
+
</checklist>
|
|
90
|
+
|
|
91
|
+
<severity_levels>
|
|
92
|
+
## Niveles de Severidad
|
|
93
|
+
|
|
94
|
+
| Nivel | Emoji | Accion |
|
|
95
|
+
|-------|-------|--------|
|
|
96
|
+
| CRITICAL | [CRITICAL] | Must fix antes de merge |
|
|
97
|
+
| SUGGESTION | [SUGGESTION] | Should fix, no bloqueante |
|
|
98
|
+
| NITPICK | [NITPICK] | Optional, mejora menor |
|
|
99
|
+
| POSITIVE | [POSITIVE] | Lo que esta bien |
|
|
100
|
+
</severity_levels>
|
|
101
|
+
|
|
102
|
+
<output_format>
|
|
103
|
+
## Formato de Output
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
# Code Review - [branch/file]
|
|
107
|
+
|
|
108
|
+
> Fecha: {{DATE}}
|
|
109
|
+
> Reviewer: ELSABRO
|
|
110
|
+
> Scope: {{SCOPE}}
|
|
111
|
+
|
|
112
|
+
## Summary
|
|
113
|
+
|
|
114
|
+
| Metrica | Valor |
|
|
115
|
+
|---------|-------|
|
|
116
|
+
| Files changed | 5 |
|
|
117
|
+
| Lines added | +127 |
|
|
118
|
+
| Lines removed | -45 |
|
|
119
|
+
| Risk level | MEDIUM |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## [CRITICAL] Issues Criticos (must fix)
|
|
124
|
+
|
|
125
|
+
### Missing null check in user handler
|
|
126
|
+
|
|
127
|
+
**File**: `src/api/users.ts:45`
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
// Current
|
|
131
|
+
const name = user.profile.name
|
|
132
|
+
|
|
133
|
+
// Suggested
|
|
134
|
+
const name = user?.profile?.name ?? 'Unknown'
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Why**: Will crash if user.profile is undefined
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## [SUGGESTION] Sugerencias (should fix)
|
|
142
|
+
|
|
143
|
+
### Consider using early return
|
|
144
|
+
|
|
145
|
+
**File**: `src/utils/validate.ts:23`
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// Current
|
|
149
|
+
if (isValid) {
|
|
150
|
+
// 30 lines of code
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Suggested
|
|
154
|
+
if (!isValid) return null
|
|
155
|
+
// 30 lines of code (less nesting)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Why**: Reduce nesting, improve readability
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## [NITPICK] Nitpicks (optional)
|
|
163
|
+
|
|
164
|
+
### Variable naming
|
|
165
|
+
**File**: `src/api/users.ts:12`
|
|
166
|
+
|
|
167
|
+
`data` -> `userData` for clarity
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## [POSITIVE] Positives
|
|
172
|
+
|
|
173
|
+
- Good error handling in API calls
|
|
174
|
+
- Follows existing patterns
|
|
175
|
+
- Tests included
|
|
176
|
+
- Clean separation of concerns
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Checklist Summary
|
|
181
|
+
|
|
182
|
+
- [x] Correctness
|
|
183
|
+
- [x] Security
|
|
184
|
+
- [ ] Performance - N+1 query potential in line 67
|
|
185
|
+
- [x] Maintainability
|
|
186
|
+
- [ ] Testing - missing edge case test
|
|
187
|
+
- [x] Conventions
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Verdict
|
|
192
|
+
|
|
193
|
+
**MEDIUM RISK** - Approve with suggestions
|
|
194
|
+
|
|
195
|
+
Fix the critical null check before merging.
|
|
196
|
+
Consider addressing the performance issue in a follow-up.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Action Items
|
|
201
|
+
|
|
202
|
+
1. [ ] Fix null check in users.ts:45
|
|
203
|
+
2. [ ] Consider early return pattern in validate.ts
|
|
204
|
+
3. [ ] Add test for empty user profile case
|
|
205
|
+
```
|
|
206
|
+
</output_format>
|
|
207
|
+
|
|
208
|
+
<interactive_mode>
|
|
209
|
+
## Modo Interactivo
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
Usuario: /elsabro:review
|
|
213
|
+
|
|
214
|
+
Claude: "Analizando cambios...
|
|
215
|
+
|
|
216
|
+
Encontre 3 archivos modificados:
|
|
217
|
+
1. src/api/users.ts (+45, -12) - Risk: HIGH
|
|
218
|
+
2. src/components/UserCard.tsx (+23, -5) - Risk: LOW
|
|
219
|
+
3. src/hooks/useUser.ts (+18, -0) - Risk: MEDIUM
|
|
220
|
+
|
|
221
|
+
Opciones:
|
|
222
|
+
1. Review completo (todos los archivos)
|
|
223
|
+
2. Solo el mas riesgoso (users.ts)
|
|
224
|
+
3. Elegir archivos especificos
|
|
225
|
+
|
|
226
|
+
Que prefieres?"
|
|
227
|
+
```
|
|
228
|
+
</interactive_mode>
|
|
229
|
+
|
|
230
|
+
<challenge_mode>
|
|
231
|
+
## Challenge Mode
|
|
232
|
+
|
|
233
|
+
Cuando el usuario dice "Grill me" o "Challenge me":
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
Claude: "Ok, modo dificil activado.
|
|
237
|
+
|
|
238
|
+
Voy a hacer preguntas sobre tus cambios:
|
|
239
|
+
|
|
240
|
+
1. En users.ts:45, por que elegiste ese approach?
|
|
241
|
+
2. Que pasa si el API devuelve null aqui?
|
|
242
|
+
3. Como escala esto con 10,000 usuarios?
|
|
243
|
+
4. Probaste el caso de error?
|
|
244
|
+
5. Por que no usaste [alternativa]?
|
|
245
|
+
|
|
246
|
+
No apruebo hasta que respondas satisfactoriamente."
|
|
247
|
+
```
|
|
248
|
+
</challenge_mode>
|
|
249
|
+
|
|
250
|
+
<diff_analysis>
|
|
251
|
+
## Analisis de Diff
|
|
252
|
+
|
|
253
|
+
Mostrar before/after cuando sea util:
|
|
254
|
+
|
|
255
|
+
```diff
|
|
256
|
+
- const data = await fetch(url)
|
|
257
|
+
+ const data = await fetch(url, {
|
|
258
|
+
+ headers: { 'Content-Type': 'application/json' },
|
|
259
|
+
+ timeout: 5000
|
|
260
|
+
+ })
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Evaluar:
|
|
264
|
+
- Es el cambio necesario?
|
|
265
|
+
- Introduce nuevos riesgos?
|
|
266
|
+
- Rompe compatibilidad?
|
|
267
|
+
</diff_analysis>
|
|
268
|
+
|
|
269
|
+
<save_report>
|
|
270
|
+
## Guardar Reporte
|
|
271
|
+
|
|
272
|
+
Con flag `--save`, guardar en `.planning/REVIEW.md`:
|
|
273
|
+
|
|
274
|
+
```markdown
|
|
275
|
+
# Code Review History
|
|
276
|
+
|
|
277
|
+
## Review: {{DATE}} - {{BRANCH}}
|
|
278
|
+
|
|
279
|
+
[Contenido del review]
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Review: {{PREV_DATE}} - {{PREV_BRANCH}}
|
|
284
|
+
|
|
285
|
+
[Review anterior]
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Mantener historial de los ultimos 10 reviews.
|
|
289
|
+
</save_report>
|
|
290
|
+
|
|
291
|
+
<integration_memory>
|
|
292
|
+
## Integracion con Memoria ELSABRO
|
|
293
|
+
|
|
294
|
+
Despues del review:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
"Encontre patterns problematicos que se repiten:
|
|
298
|
+
- Falta de null checks (3 ocurrencias)
|
|
299
|
+
- Console.logs en codigo (2 ocurrencias)
|
|
300
|
+
|
|
301
|
+
Quieres que agregue estos a .planning/mistakes.md
|
|
302
|
+
para evitarlos en el futuro?"
|
|
303
|
+
```
|
|
304
|
+
</integration_memory>
|
|
305
|
+
|
|
306
|
+
<pre_commit_hook>
|
|
307
|
+
## Pre-commit Hook
|
|
308
|
+
|
|
309
|
+
Sugerir configurar hook para review automatico:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# .git/hooks/pre-commit
|
|
313
|
+
#!/bin/bash
|
|
314
|
+
|
|
315
|
+
# Run ELSABRO review on staged files
|
|
316
|
+
claude --skill review --staged --fail-on-critical
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Esto previene commits con issues criticos.
|
|
320
|
+
</pre_commit_hook>
|
|
321
|
+
|
|
322
|
+
<verdicts>
|
|
323
|
+
## Posibles Veredictos
|
|
324
|
+
|
|
325
|
+
| Veredicto | Cuando |
|
|
326
|
+
|-----------|--------|
|
|
327
|
+
| APPROVE | Sin issues criticos, codigo solido |
|
|
328
|
+
| APPROVE WITH SUGGESTIONS | Issues menores, puede mergearse |
|
|
329
|
+
| REQUEST CHANGES | Issues criticos que deben resolverse |
|
|
330
|
+
| NEEDS DISCUSSION | Decisiones arquitectonicas pendientes |
|
|
331
|
+
</verdicts>
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: techdebt
|
|
3
|
+
description: Escaneo de deuda tecnica - codigo duplicado, TODOs, dependencias desactualizadas
|
|
4
|
+
trigger: /elsabro:audit-debt
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Bash
|
|
12
|
+
- Task
|
|
13
|
+
argument-hint: "[path] - directorio a escanear (default: .)"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# ELSABRO: Tech Debt Scanner
|
|
17
|
+
|
|
18
|
+
<objective>
|
|
19
|
+
Escanear el proyecto en busca de deuda tecnica, codigo duplicado, y areas de mejora.
|
|
20
|
+
Generar reporte estructurado compatible con el flujo de planificacion ELSABRO.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<task_integration>
|
|
24
|
+
## Integracion con Tasks API
|
|
25
|
+
|
|
26
|
+
Al iniciar escaneo:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
TaskCreate:
|
|
30
|
+
description: "Audit de deuda tecnica: [path]"
|
|
31
|
+
status: in_progress
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Actualizar progreso por categoria escaneada.
|
|
35
|
+
Al finalizar, incluir resumen con health score.
|
|
36
|
+
</task_integration>
|
|
37
|
+
|
|
38
|
+
<triggers>
|
|
39
|
+
## Triggers
|
|
40
|
+
|
|
41
|
+
- `/elsabro:audit-debt` - Escaneo completo del proyecto
|
|
42
|
+
- `/elsabro:audit-debt [path]` - Escaneo de directorio especifico
|
|
43
|
+
- `/elsabro:audit-debt --quick` - Solo issues CRITICAL y HIGH
|
|
44
|
+
- `/elsabro:audit-debt --save` - Guardar reporte en .planning/TECHDEBT.md
|
|
45
|
+
</triggers>
|
|
46
|
+
|
|
47
|
+
<scan_categories>
|
|
48
|
+
## Categorias de Escaneo
|
|
49
|
+
|
|
50
|
+
### 1. Codigo Duplicado
|
|
51
|
+
Buscar patrones repetidos que podrian extraerse:
|
|
52
|
+
- Funciones similares en diferentes archivos
|
|
53
|
+
- Logica copy-paste con pequenas variaciones
|
|
54
|
+
- Componentes que hacen lo mismo con diferentes props
|
|
55
|
+
|
|
56
|
+
### 2. TODOs y FIXMEs
|
|
57
|
+
Buscar comentarios pendientes con contexto:
|
|
58
|
+
```
|
|
59
|
+
grep -r "TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.tsx"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Dependencias Desactualizadas
|
|
63
|
+
```
|
|
64
|
+
npm outdated
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 4. Complejidad Ciclomatica
|
|
68
|
+
- Funciones con mas de 50 lineas
|
|
69
|
+
- Mas de 4 niveles de anidacion
|
|
70
|
+
- Mas de 10 ramas condicionales
|
|
71
|
+
|
|
72
|
+
### 5. Cobertura de Tests
|
|
73
|
+
Si hay tests configurados:
|
|
74
|
+
```
|
|
75
|
+
npm test -- --coverage --silent
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 6. Tipos Debiles (TypeScript)
|
|
79
|
+
- `any` explicitos
|
|
80
|
+
- `as unknown as X` casts
|
|
81
|
+
- `// @ts-ignore` o `// @ts-expect-error`
|
|
82
|
+
|
|
83
|
+
### 7. Console.logs Olvidados
|
|
84
|
+
```
|
|
85
|
+
grep -r "console.log\|console.warn\|console.error" --include="*.ts" --include="*.tsx" src/
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 8. Imports No Utilizados
|
|
89
|
+
Detectar via ESLint/TypeScript.
|
|
90
|
+
|
|
91
|
+
### 9. Variables de Entorno
|
|
92
|
+
Verificar que `.env.example` tenga todas las variables necesarias.
|
|
93
|
+
|
|
94
|
+
### 10. Archivos Grandes
|
|
95
|
+
Archivos con mas de 300 lineas que podrian dividirse.
|
|
96
|
+
</scan_categories>
|
|
97
|
+
|
|
98
|
+
<severity_classification>
|
|
99
|
+
## Clasificacion de Severidad
|
|
100
|
+
|
|
101
|
+
Usar clasificacion consistente con ELSABRO:
|
|
102
|
+
|
|
103
|
+
| Severity | Emoji | Criterio |
|
|
104
|
+
|----------|-------|----------|
|
|
105
|
+
| CRITICAL | [CRITICAL] | Vulnerabilidades de seguridad, builds rotos |
|
|
106
|
+
| HIGH | [HIGH] | Major versions atrasados, codigo sin tests criticos |
|
|
107
|
+
| MEDIUM | [MEDIUM] | Minor versions, complejidad alta |
|
|
108
|
+
| LOW | [LOW] | Nitpicks, style issues, patch versions |
|
|
109
|
+
|
|
110
|
+
### Reglas de Clasificacion
|
|
111
|
+
|
|
112
|
+
**CRITICAL:**
|
|
113
|
+
- Vulnerabilidades CVE conocidas
|
|
114
|
+
- Secretos expuestos
|
|
115
|
+
- Memory leaks confirmados
|
|
116
|
+
- Tests principales fallando
|
|
117
|
+
|
|
118
|
+
**HIGH:**
|
|
119
|
+
- Codigo duplicado > 50 lineas
|
|
120
|
+
- Archivos > 500 lineas
|
|
121
|
+
- TODOs con "FIXME" o "URGENT"
|
|
122
|
+
- Dependencias major atrasadas
|
|
123
|
+
|
|
124
|
+
**MEDIUM:**
|
|
125
|
+
- Uso de `any` en TypeScript
|
|
126
|
+
- Funciones > 100 lineas
|
|
127
|
+
- TODOs generales > 30 dias
|
|
128
|
+
- Console.logs en produccion
|
|
129
|
+
|
|
130
|
+
**LOW:**
|
|
131
|
+
- Naming conventions
|
|
132
|
+
- Imports no utilizados
|
|
133
|
+
- Comentarios desactualizados
|
|
134
|
+
- Dependencias patch atrasadas
|
|
135
|
+
</severity_classification>
|
|
136
|
+
|
|
137
|
+
<output_format>
|
|
138
|
+
## Formato de Output
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
# Tech Debt Report - {{PROJECT_NAME}}
|
|
142
|
+
|
|
143
|
+
> Generado: {{DATE}}
|
|
144
|
+
> Path escaneado: {{PATH}}
|
|
145
|
+
|
|
146
|
+
## Resumen Ejecutivo
|
|
147
|
+
|
|
148
|
+
| Categoria | CRITICAL | HIGH | MEDIUM | LOW |
|
|
149
|
+
|-----------|----------|------|--------|-----|
|
|
150
|
+
| Duplicacion | 0 | 2 | 5 | 3 |
|
|
151
|
+
| TODOs | 1 | 4 | 8 | 2 |
|
|
152
|
+
| Dependencias | 0 | 1 | 3 | 12 |
|
|
153
|
+
| Complejidad | 0 | 3 | 7 | 15 |
|
|
154
|
+
| Tests | 2 | 5 | 10 | - |
|
|
155
|
+
| Tipos | 0 | 8 | 15 | 20 |
|
|
156
|
+
|
|
157
|
+
**Total Issues**: 125
|
|
158
|
+
**Health Score**: 72/100
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## [CRITICAL] Issues Criticos (Resolver AHORA)
|
|
163
|
+
|
|
164
|
+
### Vulnerabilidad en lodash@4.17.15
|
|
165
|
+
- **Ubicacion**: package.json
|
|
166
|
+
- **Accion**: `npm update lodash`
|
|
167
|
+
- **CVE**: CVE-2021-23337
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## [HIGH] Issues Altos (Resolver esta semana)
|
|
172
|
+
|
|
173
|
+
### Codigo duplicado: formatDate
|
|
174
|
+
- **Archivos**:
|
|
175
|
+
- src/utils/format.ts:45-67
|
|
176
|
+
- src/helpers/date.ts:12-34
|
|
177
|
+
- **Lineas duplicadas**: 22
|
|
178
|
+
- **Sugerencia**: Crear `src/lib/date-utils.ts`
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## [MEDIUM] Issues Medios (Backlog)
|
|
183
|
+
|
|
184
|
+
### Uso excesivo de `any`
|
|
185
|
+
- **Total**: 15 ocurrencias
|
|
186
|
+
- **Archivos principales**:
|
|
187
|
+
- src/api/client.ts (5)
|
|
188
|
+
- src/utils/helpers.ts (4)
|
|
189
|
+
- **Sugerencia**: Crear tipos especificos
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## [LOW] Issues Menores (Opcional)
|
|
194
|
+
|
|
195
|
+
### Console.logs en codigo
|
|
196
|
+
- **Total**: 8 ocurrencias
|
|
197
|
+
- **Sugerencia**: Usar logger estructurado
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Recomendaciones
|
|
202
|
+
|
|
203
|
+
1. [ ] Crear ticket para resolver vulnerabilidades de seguridad
|
|
204
|
+
2. [ ] Dedicar 20% del sprint a reducir TODOs
|
|
205
|
+
3. [ ] Agregar pre-commit hook para prevenir console.logs
|
|
206
|
+
4. [ ] Configurar ESLint para detectar `any`
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Proximo Escaneo
|
|
211
|
+
|
|
212
|
+
Ejecutar `/elsabro:audit-debt` despues de cada merge a main.
|
|
213
|
+
```
|
|
214
|
+
</output_format>
|
|
215
|
+
|
|
216
|
+
<health_score>
|
|
217
|
+
## Calculo de Health Score
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
Base: 100 puntos
|
|
221
|
+
|
|
222
|
+
Deducciones:
|
|
223
|
+
- CRITICAL: -15 puntos cada uno
|
|
224
|
+
- HIGH: -5 puntos cada uno
|
|
225
|
+
- MEDIUM: -1 punto cada uno
|
|
226
|
+
- LOW: -0.25 puntos cada uno
|
|
227
|
+
|
|
228
|
+
Minimo: 0 puntos
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Interpretacion
|
|
232
|
+
|
|
233
|
+
| Score | Estado | Accion |
|
|
234
|
+
|-------|--------|--------|
|
|
235
|
+
| 90-100 | Excelente | Mantener |
|
|
236
|
+
| 70-89 | Bueno | Monitorear |
|
|
237
|
+
| 50-69 | Aceptable | Planificar mejoras |
|
|
238
|
+
| 30-49 | Preocupante | Priorizar deuda |
|
|
239
|
+
| 0-29 | Critico | Parar features, resolver deuda |
|
|
240
|
+
</health_score>
|
|
241
|
+
|
|
242
|
+
<save_report>
|
|
243
|
+
## Guardar Reporte
|
|
244
|
+
|
|
245
|
+
Con flag `--save`, guardar en `.planning/TECHDEBT.md`:
|
|
246
|
+
|
|
247
|
+
```markdown
|
|
248
|
+
# Tech Debt Tracking
|
|
249
|
+
|
|
250
|
+
## Ultimo Escaneo: {{DATE}}
|
|
251
|
+
|
|
252
|
+
[Contenido del reporte]
|
|
253
|
+
|
|
254
|
+
## Historial de Health Score
|
|
255
|
+
|
|
256
|
+
| Fecha | Score | CRITICAL | HIGH | Notas |
|
|
257
|
+
|-------|-------|----------|------|-------|
|
|
258
|
+
| 2024-01-20 | 72 | 0 | 5 | Post-refactor |
|
|
259
|
+
| 2024-01-15 | 65 | 1 | 8 | Antes de limpieza |
|
|
260
|
+
| 2024-01-10 | 58 | 2 | 12 | Inicial |
|
|
261
|
+
```
|
|
262
|
+
</save_report>
|
|
263
|
+
|
|
264
|
+
<integration_planning>
|
|
265
|
+
## Integracion con Planificacion ELSABRO
|
|
266
|
+
|
|
267
|
+
Ofrecer despues del escaneo:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
"Encontre {{N}} issues criticos y {{M}} altos.
|
|
271
|
+
|
|
272
|
+
Opciones:
|
|
273
|
+
1. `/elsabro:plan debt-reduction` - Crear plan para resolver deuda
|
|
274
|
+
2. Agregar issues a fase existente
|
|
275
|
+
3. Solo guardar reporte para referencia
|
|
276
|
+
|
|
277
|
+
Que prefieres?"
|
|
278
|
+
```
|
|
279
|
+
</integration_planning>
|
|
280
|
+
|
|
281
|
+
<automatic_scheduling>
|
|
282
|
+
## Programacion Automatica
|
|
283
|
+
|
|
284
|
+
Sugerir al usuario agregar a su workflow:
|
|
285
|
+
- Final de cada sesion de trabajo
|
|
286
|
+
- Antes de cada PR
|
|
287
|
+
- Semanalmente como rutina
|
|
288
|
+
- Post-merge a main
|
|
289
|
+
</automatic_scheduling>
|