elsabro 2.1.0 → 2.3.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 (64) hide show
  1. package/agents/elsabro-orchestrator.md +113 -0
  2. package/commands/elsabro/add-phase.md +17 -0
  3. package/commands/elsabro/add-todo.md +111 -53
  4. package/commands/elsabro/audit-milestone.md +19 -0
  5. package/commands/elsabro/check-todos.md +210 -31
  6. package/commands/elsabro/complete-milestone.md +20 -1
  7. package/commands/elsabro/debug.md +19 -0
  8. package/commands/elsabro/discuss-phase.md +18 -1
  9. package/commands/elsabro/execute.md +511 -58
  10. package/commands/elsabro/insert-phase.md +18 -1
  11. package/commands/elsabro/list-phase-assumptions.md +17 -0
  12. package/commands/elsabro/new-milestone.md +19 -0
  13. package/commands/elsabro/new.md +19 -0
  14. package/commands/elsabro/pause-work.md +19 -0
  15. package/commands/elsabro/plan-milestone-gaps.md +20 -1
  16. package/commands/elsabro/plan.md +264 -36
  17. package/commands/elsabro/progress.md +203 -79
  18. package/commands/elsabro/quick.md +19 -0
  19. package/commands/elsabro/remove-phase.md +17 -0
  20. package/commands/elsabro/research-phase.md +18 -1
  21. package/commands/elsabro/resume-work.md +19 -0
  22. package/commands/elsabro/start.md +399 -98
  23. package/commands/elsabro/verify-work.md +138 -5
  24. package/hooks/confirm-destructive.sh +145 -0
  25. package/hooks/hooks-config.json +81 -0
  26. package/hooks/lint-check.sh +238 -0
  27. package/hooks/post-edit-test.sh +189 -0
  28. package/package.json +3 -2
  29. package/references/SYSTEM_INDEX.md +241 -0
  30. package/references/command-flow.md +352 -0
  31. package/references/enforcement-rules.md +331 -0
  32. package/references/error-contracts-tests.md +1171 -0
  33. package/references/error-contracts.md +3102 -0
  34. package/references/error-handling-instructions.md +26 -12
  35. package/references/parallel-worktrees.md +293 -0
  36. package/references/state-sync.md +381 -0
  37. package/references/task-dispatcher.md +388 -0
  38. package/references/tasks-integration.md +380 -0
  39. package/scripts/setup-parallel-worktrees.sh +319 -0
  40. package/skills/api-microservice.md +765 -0
  41. package/skills/api-setup.md +76 -3
  42. package/skills/auth-setup.md +46 -6
  43. package/skills/chrome-extension.md +584 -0
  44. package/skills/cicd-setup.md +1206 -0
  45. package/skills/cli-tool.md +884 -0
  46. package/skills/database-setup.md +41 -5
  47. package/skills/desktop-app.md +1351 -0
  48. package/skills/expo-app.md +35 -2
  49. package/skills/full-stack-app.md +543 -0
  50. package/skills/memory-update.md +207 -0
  51. package/skills/mobile-app.md +813 -0
  52. package/skills/nextjs-app.md +33 -2
  53. package/skills/payments-setup.md +76 -1
  54. package/skills/review.md +331 -0
  55. package/skills/saas-starter.md +639 -0
  56. package/skills/sentry-setup.md +41 -7
  57. package/skills/techdebt.md +289 -0
  58. package/skills/testing-setup.md +1218 -0
  59. package/skills/tutor.md +219 -0
  60. package/templates/.planning/notes/.gitkeep +0 -0
  61. package/templates/CLAUDE.md.template +48 -0
  62. package/templates/error-handling-config.json +79 -2
  63. package/templates/mistakes.md.template +52 -0
  64. package/templates/patterns.md.template +114 -0
@@ -2,6 +2,8 @@
2
2
  name: progress
3
3
  description: Ver el progreso del proyecto y qué hacer siguiente
4
4
  allowed-tools:
5
+ - TaskList
6
+ - TaskGet
5
7
  - Read
6
8
  - Glob
7
9
  - Grep
@@ -11,134 +13,175 @@ allowed-tools:
11
13
  # ELSABRO: Progress
12
14
 
13
15
  <objective>
14
- Mostrar el estado actual del proyecto y guiar al usuario sobre qué hacer a continuación.
16
+ Mostrar el estado actual del proyecto y guiar al usuario sobre qué hacer a continuación usando **Claude Code Tasks API** como fuente de verdad.
15
17
  </objective>
16
18
 
17
19
  <process>
18
- ## Paso 1: Detectar Estado del Proyecto
19
-
20
- ```bash
21
- # Verificar si hay proyecto ELSABRO
22
- ls .planning/ 2>/dev/null
20
+ ## Paso 1: Cargar Estado desde Tasks API
21
+
22
+ ```javascript
23
+ // Obtener todas las tasks
24
+ const allTasks = TaskList();
25
+
26
+ // Filtrar por tipo
27
+ const milestones = allTasks.filter(t => t.metadata?.type === "milestone");
28
+ const phases = allTasks.filter(t => t.metadata?.type === "phase");
29
+ const todos = allTasks.filter(t => t.metadata?.type === "todo");
30
+ const work = allTasks.filter(t => t.metadata?.type === "work");
31
+
32
+ // Estado actual
33
+ const inProgress = allTasks.filter(t => t.status === "in_progress");
34
+ const pending = allTasks.filter(t => t.status === "pending");
35
+ const completed = allTasks.filter(t => t.status === "completed");
36
+ const blocked = allTasks.filter(t => t.blockedBy?.length > 0);
23
37
  ```
24
38
 
25
- ### Si no existe .planning/
39
+ ### Si no hay tasks
26
40
  ```
27
- No hay un proyecto ELSABRO en este directorio.
41
+ No hay tareas registradas en este proyecto.
28
42
 
29
- ¿Quieres empezar uno nuevo?
43
+ ¿Quieres empezar?
30
44
  → /elsabro:start
31
45
  ```
32
46
 
33
- ### Si existe .planning/
47
+ ### Si hay tasks
34
48
  Continuar a Paso 2.
35
49
 
36
- ## Paso 2: Cargar Contexto
37
-
38
- Leer estos archivos si existen:
39
- - `.planning/PROJECT.md` → Información del proyecto
40
- - `.planning/ROADMAP.md` Fases planificadas
41
- - `.planning/config.json` Configuración
42
- - `.planning/*-VERIFICATION.md` Estados de verificación
43
-
44
- ## Paso 3: Calcular Progreso
45
-
46
- ```
47
- Para cada fase en ROADMAP:
48
- - ¿Tiene PLAN.md? → Planificada
49
- - ¿Tiene SUMMARY.md? Ejecutada
50
- - ¿Tiene VERIFICATION.md con passed? → Completada
51
- - ¿Tiene gaps? → Necesita corrección
50
+ ## Paso 2: Calcular Progreso
51
+
52
+ ```javascript
53
+ // Progreso general
54
+ const totalTasks = allTasks.length;
55
+ const completedTasks = completed.length;
56
+ const progressPercent = Math.round((completedTasks / totalTasks) * 100);
57
+
58
+ // Por milestone
59
+ const milestoneProgress = milestones.map(m => {
60
+ const phasesInMilestone = phases.filter(p =>
61
+ p.metadata?.milestone_id === m.metadata?.milestone_id
62
+ );
63
+ const completedPhases = phasesInMilestone.filter(p => p.status === "completed");
64
+ return {
65
+ name: m.subject,
66
+ progress: Math.round((completedPhases.length / phasesInMilestone.length) * 100),
67
+ phases: phasesInMilestone
68
+ };
69
+ });
52
70
  ```
53
71
 
54
- ## Paso 4: Mostrar Resumen
72
+ ## Paso 3: Mostrar Resumen
55
73
 
56
74
  ```
57
75
  ┌─────────────────────────────────────────────┐
58
- │ [Nombre del Proyecto]
59
- │ [Descripción corta]
76
+ │ [Milestone Actual]
77
+ │ [Descripción]
60
78
  └─────────────────────────────────────────────┘
61
79
 
62
80
  Progreso: ████████░░ 80%
63
81
 
64
- Fases:
65
- Fase 1: Setup inicial
66
- Fase 2: Autenticación
67
- Fase 3: Dashboard (en progreso)
68
- Fase 4: Pagos
69
- Fase 5: Deploy
82
+ Phases:
83
+ Phase 1: Setup inicial
84
+ Phase 2: Autenticación
85
+ Phase 3: Dashboard (en progreso)
86
+ Phase 4: Pagos
87
+ Phase 5: Deploy
88
+
89
+ TODOs pendientes: 5 (2 high, 3 medium)
90
+ Tareas bloqueadas: 1
70
91
 
71
92
  Última actividad: hace 2 horas
72
- Último commit: feat(3-1): Add dashboard layout
93
+ ```
94
+
95
+ ## Paso 4: Mostrar Trabajo Actual
96
+
97
+ ```javascript
98
+ // Tareas en progreso
99
+ const currentWork = inProgress.map(t => ({
100
+ id: t.id,
101
+ subject: t.subject,
102
+ type: t.metadata?.type,
103
+ owner: t.owner || "unassigned"
104
+ }));
105
+ ```
106
+
107
+ ```
108
+ 📍 En progreso ahora:
109
+ #<ID> Implement user dashboard [work]
110
+ #<ID> Fix auth token refresh [todo]
111
+
112
+ ⏸️ Bloqueado:
113
+ #<ID> Deploy to production (blocked by #<ID>)
73
114
  ```
74
115
 
75
116
  ## Paso 5: Sugerir Siguiente Acción
76
117
 
77
- Basado en el estado:
118
+ ### Si hay work in_progress:
119
+ ```
120
+ Continúa con el trabajo actual:
121
+ → /elsabro:execute (para continuar implementación)
122
+ → /elsabro:verify-work (si crees que terminaste)
123
+ ```
78
124
 
79
- ### Si hay fase en progreso sin completar:
125
+ ### Si hay TODOs high priority:
80
126
  ```
81
- Siguiente paso recomendado:
82
- Continuar fase 3: /elsabro:execute 3
127
+ TODOs de alta prioridad pendientes:
128
+ #<ID> Update error messages [high]
129
+ #<ID> Fix validation bug [high]
83
130
 
84
- O si necesitas ayuda:
85
- Ver el plan: cat .planning/3-PLAN.md
86
- → Depurar problema: /elsabro:debug
131
+ /elsabro:check-todos (ver todos)
132
+ /elsabro:quick "<TODO>" (resolver uno rápido)
87
133
  ```
88
134
 
89
- ### Si la última fase está completada:
135
+ ### Si la última phase está completada:
90
136
  ```
91
137
  ¡Excelente progreso!
92
138
 
93
- Siguiente paso recomendado:
94
- Planificar fase 4: /elsabro:plan 4
95
-
96
- O alternativamente:
97
- → Verificar todo: /elsabro:verify
98
- → Ver el roadmap: cat .planning/ROADMAP.md
139
+ Siguiente phase disponible:
140
+ → /elsabro:plan (planificar siguiente)
141
+ → /elsabro:add-phase (agregar nueva phase)
99
142
  ```
100
143
 
101
- ### Si hay gaps pendientes:
144
+ ### Si hay tasks bloqueadas:
102
145
  ```
103
- ⚠ Hay problemas pendientes en fase 3
146
+ ⚠ Hay trabajo bloqueado
104
147
 
105
- Gaps encontrados:
106
- - [ ] Test de validación fallando
107
- - [ ] Falta middleware de auth
148
+ #<ID> Deploy to production
149
+ Bloqueado por: #<ID> Complete security audit
108
150
 
109
- Siguiente paso recomendado:
110
- Corregir gaps: /elsabro:debug
111
- Ver detalles: cat .planning/3-VERIFICATION.md
151
+ Opciones:
152
+ Ver detalles: TaskGet #<ID>
153
+ Resolver bloqueador: /elsabro:execute
154
+ → Desbloquear manualmente: /elsabro:check-todos --complete=<ID>
112
155
  ```
113
156
 
114
- ### Si el proyecto está completo:
157
+ ### Si todo está completado:
115
158
  ```
116
- 🎉 ¡Proyecto completado!
159
+ 🎉 ¡Milestone completado!
117
160
 
118
- Todas las fases verificadas:
119
- Fase 1: Setup inicial
120
- Fase 2: Autenticación
121
- Fase 3: Dashboard
122
- Fase 4: Pagos
123
- Fase 5: Deploy
161
+ Todas las phases verificadas:
162
+ Phase 1: Setup inicial
163
+ Phase 2: Autenticación
164
+ Phase 3: Dashboard
165
+ Phase 4: Pagos
166
+ Phase 5: Deploy
124
167
 
125
168
  Opciones:
126
- Agregar nueva feature: /elsabro:plan "nueva feature"
127
- Revisar código: Ver archivos
128
- Actualizar ELSABRO: /elsabro:update
169
+ Crear nuevo milestone: /elsabro:new-milestone
170
+ Agregar feature: /elsabro:plan "nueva feature"
171
+ Ver TODOs pendientes: /elsabro:check-todos
129
172
  ```
130
173
  </process>
131
174
 
132
175
  <visual_indicators>
133
176
  ## Indicadores Visuales
134
177
 
135
- | Símbolo | Significado |
136
- |---------|-------------|
137
- | ✓ | Completado y verificado |
138
- | → | En progreso actual |
139
- | ○ | Pendiente |
140
- | | Tiene problemas/gaps |
141
- | ✗ | Falló verificación |
178
+ | Símbolo | Significado | Task Status |
179
+ |---------|-------------|-------------|
180
+ | ✓ | Completado | completed |
181
+ | → | En progreso | in_progress |
182
+ | ○ | Pendiente | pending |
183
+ | ⏸️ | Bloqueado | pending + blockedBy |
184
+ | ✗ | Fallido | failed (metadata) |
142
185
 
143
186
  ## Barra de Progreso
144
187
 
@@ -151,6 +194,53 @@ Opciones:
151
194
  ```
152
195
  </visual_indicators>
153
196
 
197
+ <tasks_summary>
198
+ ## Resumen por Tipo de Task
199
+
200
+ ```javascript
201
+ const summary = {
202
+ milestones: {
203
+ total: milestones.length,
204
+ completed: milestones.filter(t => t.status === "completed").length,
205
+ inProgress: milestones.filter(t => t.status === "in_progress").length
206
+ },
207
+ phases: {
208
+ total: phases.length,
209
+ completed: phases.filter(t => t.status === "completed").length,
210
+ inProgress: phases.filter(t => t.status === "in_progress").length
211
+ },
212
+ todos: {
213
+ total: todos.length,
214
+ critical: todos.filter(t => t.metadata?.priority === "critical").length,
215
+ high: todos.filter(t => t.metadata?.priority === "high").length,
216
+ completed: todos.filter(t => t.status === "completed").length
217
+ },
218
+ work: {
219
+ total: work.length,
220
+ inProgress: work.filter(t => t.status === "in_progress").length,
221
+ completed: work.filter(t => t.status === "completed").length
222
+ }
223
+ };
224
+ ```
225
+
226
+ Output:
227
+ ```
228
+ ╔══════════════════════════════════════════════════╗
229
+ ║ PROJECT SUMMARY ║
230
+ ╠══════════════════════════════════════════════════╣
231
+ ║ ║
232
+ ║ Milestones: 1/2 completed ║
233
+ ║ Phases: 4/5 completed ║
234
+ ║ TODOs: 8 pending (2 critical, 3 high) ║
235
+ ║ Work items: 3 in progress ║
236
+ ║ ║
237
+ ║ Blocked: 1 task ║
238
+ ║ Dependencies: 5 total ║
239
+ ║ ║
240
+ ╚══════════════════════════════════════════════════╝
241
+ ```
242
+ </tasks_summary>
243
+
154
244
  <context_awareness>
155
245
  ## Consciencia de Contexto
156
246
 
@@ -173,15 +263,49 @@ Recomendación:
173
263
  ```
174
264
 
175
265
  ### Tiempo desde última actividad
266
+ ```javascript
267
+ // Encontrar última task actualizada
268
+ const lastUpdated = allTasks
269
+ .filter(t => t.metadata?.updated_at)
270
+ .sort((a, b) => new Date(b.metadata.updated_at) - new Date(a.metadata.updated_at))[0];
271
+
272
+ const hoursSince = (Date.now() - new Date(lastUpdated.metadata.updated_at)) / (1000 * 60 * 60);
273
+
274
+ if (hoursSince > 24) {
275
+ // Mostrar contexto de última sesión
276
+ }
277
+ ```
278
+
176
279
  Si han pasado más de 24 horas:
177
280
  ```
178
281
  Ha pasado tiempo desde tu última sesión.
179
282
 
180
283
  Resumen de dónde te quedaste:
181
- - Fase actual: [N]
182
- - Última tarea: [descripción]
183
- - Estado: [pendiente/en progreso]
284
+ - Última task: #<ID> Implement dashboard
285
+ - Estado: in_progress
286
+ - Hace: 2 días
184
287
 
185
288
  ¿Quieres continuar donde lo dejaste?
289
+ → /elsabro:resume-work
186
290
  ```
187
291
  </context_awareness>
292
+
293
+ <state_sync>
294
+ ## State Sync (Tasks API)
295
+
296
+ Este comando es READ-ONLY - no modifica tasks, solo consulta.
297
+
298
+ ```javascript
299
+ // Lectura de estado (NO escritura)
300
+ const state = {
301
+ tasks: TaskList(),
302
+ current: TaskList().find(t => t.status === "in_progress"),
303
+ blocked: TaskList().filter(t => t.blockedBy?.length > 0)
304
+ };
305
+ ```
306
+
307
+ Si necesitas actualizar estado, usa otros comandos:
308
+ - `/elsabro:pause-work` - Guardar contexto
309
+ - `/elsabro:resume-work` - Retomar trabajo
310
+ - `/elsabro:check-todos` - Gestionar TODOs
311
+ </state_sync>
@@ -1,10 +1,29 @@
1
1
  ---
2
2
  name: quick
3
3
  description: Modo de ejecución rápida para tareas simples - mínima ceremonia, máxima velocidad
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json", ".elsabro/context.md"]
4
7
  ---
5
8
 
6
9
  # /elsabro:quick
7
10
 
11
+ <state_sync>
12
+ ## SINCRONIZACION DE ESTADO
13
+
14
+ **IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
15
+
16
+ ### Al Iniciar
17
+ - Leer `.elsabro/state.json`
18
+ - Verificar si hay flujo en progreso
19
+ - Actualizar `current_flow.command` con este comando
20
+
21
+ ### Al Completar
22
+ - Registrar en `history`
23
+ - Actualizar `context` con informacion relevante
24
+ - Limpiar `current_flow`
25
+ </state_sync>
26
+
8
27
  <command-name>quick</command-name>
9
28
 
10
29
  ## Propósito
@@ -1,10 +1,27 @@
1
1
  ---
2
2
  name: remove-phase
3
3
  description: Eliminar una fase del milestone (con validaciones de seguridad)
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json"]
4
7
  ---
5
8
 
6
9
  # /elsabro:remove-phase
7
10
 
11
+ <state_sync>
12
+ ## SINCRONIZACION DE ESTADO
13
+
14
+ **IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
15
+
16
+ ### Al Iniciar
17
+ - Leer `.elsabro/state.json`
18
+ - Verificar contexto actual del milestone/phase
19
+
20
+ ### Al Completar
21
+ - Registrar cambio en `history`
22
+ - Actualizar `context` si corresponde
23
+ </state_sync>
24
+
8
25
  <command-name>remove-phase</command-name>
9
26
 
10
27
  ## Propósito
@@ -1,10 +1,27 @@
1
1
  ---
2
2
  name: research-phase
3
- description: Investigar tecnologías, patrones y approaches para una fase antes de planificar
3
+ description: Investigar tecnologias, patrones y approaches para una fase antes de planificar
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json"]
4
7
  ---
5
8
 
6
9
  # /elsabro:research-phase
7
10
 
11
+ <state_sync>
12
+ ## SINCRONIZACION DE ESTADO
13
+
14
+ **IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
15
+
16
+ ### Al Iniciar
17
+ - Leer `.elsabro/state.json`
18
+ - Verificar contexto actual del milestone/phase
19
+
20
+ ### Al Completar
21
+ - Registrar cambio en `history`
22
+ - Actualizar `context` si corresponde
23
+ </state_sync>
24
+
8
25
  <command-name>research-phase</command-name>
9
26
 
10
27
  ## Propósito
@@ -11,10 +11,29 @@ allowed-tools:
11
11
  - TaskUpdate
12
12
  - TaskList
13
13
  - TaskCreate
14
+ sync:
15
+ reads: [".elsabro/state.json"]
16
+ writes: [".elsabro/state.json", ".elsabro/context.md"]
14
17
  ---
15
18
 
16
19
  # /elsabro:resume-work
17
20
 
21
+ <state_sync>
22
+ ## SINCRONIZACION DE ESTADO
23
+
24
+ **IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
25
+
26
+ ### Al Iniciar
27
+ - Leer `.elsabro/state.json`
28
+ - Verificar si hay flujo en progreso
29
+ - Actualizar `current_flow.command` con este comando
30
+
31
+ ### Al Completar
32
+ - Registrar en `history`
33
+ - Actualizar `context` con informacion relevante
34
+ - Limpiar `current_flow`
35
+ </state_sync>
36
+
18
37
  <command-name>resume-work</command-name>
19
38
 
20
39
  ## Propósito