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
@@ -1,10 +1,27 @@
1
1
  ---
2
2
  name: insert-phase
3
- description: Insertar una nueva fase en una posición específica del milestone
3
+ description: Insertar una nueva fase en una posicion especifica del milestone
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json"]
4
7
  ---
5
8
 
6
9
  # /elsabro:insert-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>insert-phase</command-name>
9
26
 
10
27
  ## Propósito
@@ -1,10 +1,27 @@
1
1
  ---
2
2
  name: list-phase-assumptions
3
3
  description: Listar y validar los supuestos hechos para una fase del proyecto
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json"]
4
7
  ---
5
8
 
6
9
  # /elsabro:list-phase-assumptions
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>list-phase-assumptions</command-name>
9
26
 
10
27
  ## Propósito
@@ -1,10 +1,29 @@
1
1
  ---
2
2
  name: new-milestone
3
3
  description: Crear un nuevo milestone con objetivos, timeline y métricas de éxito
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json", ".elsabro/context.md"]
4
7
  ---
5
8
 
6
9
  # /elsabro:new-milestone
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 del milestone
24
+ - Limpiar `current_flow`
25
+ </state_sync>
26
+
8
27
  <command-name>new-milestone</command-name>
9
28
 
10
29
  ## Propósito
@@ -12,10 +12,29 @@ allowed-tools:
12
12
  - WebSearch
13
13
  - mcp__plugin_context7_context7__*
14
14
  argument-hint: "[tipo de proyecto: web, mobile, api]"
15
+ sync:
16
+ reads: [".elsabro/state.json"]
17
+ writes: [".elsabro/state.json", ".elsabro/context.md"]
15
18
  ---
16
19
 
17
20
  # ELSABRO: Nuevo Proyecto
18
21
 
22
+ <state_sync>
23
+ ## SINCRONIZACION DE ESTADO
24
+
25
+ **IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
26
+
27
+ ### Al Iniciar
28
+ - Leer `.elsabro/state.json`
29
+ - Verificar si hay flujo en progreso
30
+ - Actualizar `current_flow.command` con este comando
31
+
32
+ ### Al Completar
33
+ - Registrar en `history`
34
+ - Actualizar `context` con informacion relevante
35
+ - Limpiar `current_flow`
36
+ </state_sync>
37
+
19
38
  <objective>
20
39
  Crear un proyecto nuevo con investigación previa, configuración correcta, y estructura lista para desarrollo.
21
40
 
@@ -10,10 +10,29 @@ allowed-tools:
10
10
  - TaskCreate
11
11
  - TaskList
12
12
  - TaskGet
13
+ sync:
14
+ reads: [".elsabro/state.json"]
15
+ writes: [".elsabro/state.json", ".elsabro/context.md"]
13
16
  ---
14
17
 
15
18
  # /elsabro:pause-work
16
19
 
20
+ <state_sync>
21
+ ## SINCRONIZACION DE ESTADO
22
+
23
+ **IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
24
+
25
+ ### Al Iniciar
26
+ - Leer `.elsabro/state.json`
27
+ - Verificar si hay flujo en progreso
28
+ - Actualizar `current_flow.command` con este comando
29
+
30
+ ### Al Completar
31
+ - Registrar en `history`
32
+ - Actualizar `context` con informacion relevante
33
+ - Limpiar `current_flow`
34
+ </state_sync>
35
+
17
36
  <command-name>pause-work</command-name>
18
37
 
19
38
  ## Propósito
@@ -1,10 +1,29 @@
1
1
  ---
2
2
  name: plan-milestone-gaps
3
- description: Identificar y planificar cómo cerrar gaps en un milestone para alcanzar los objetivos
3
+ description: Identificar y planificar como cerrar gaps en un milestone para alcanzar los objetivos
4
+ sync:
5
+ reads: [".elsabro/state.json"]
6
+ writes: [".elsabro/state.json", ".elsabro/context.md"]
4
7
  ---
5
8
 
6
9
  # /elsabro:plan-milestone-gaps
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 del milestone
24
+ - Limpiar `current_flow`
25
+ </state_sync>
26
+
8
27
  <command-name>plan-milestone-gaps</command-name>
9
28
 
10
29
  ## Propósito
@@ -8,17 +8,174 @@ allowed-tools:
8
8
  - Glob
9
9
  - Grep
10
10
  - Task
11
+ - TaskCreate
12
+ - TaskUpdate
13
+ - TaskList
11
14
  - WebSearch
15
+ - AskUserQuestion
12
16
  - mcp__plugin_context7_context7__*
13
17
  argument-hint: "[número de fase o descripción de feature]"
18
+ sync:
19
+ reads: [".elsabro/state.json", ".planning/PROJECT.md", ".planning/ROADMAP.md"]
20
+ writes: [".elsabro/state.json", ".elsabro/context.md", ".planning/*-RESEARCH.md", ".planning/*-PLAN.md"]
21
+ phases: ["initializing", "exploring", "researching", "planning", "validating", "done"]
22
+ passes_context_to: ["execute"]
23
+ dispatcher:
24
+ exploration:
25
+ agents: [Explore, feature-dev:code-explorer, Plan]
26
+ model: haiku
27
+ parallel: true
28
+ min_agents: 3
29
+ planning:
30
+ agents: [elsabro-planner]
31
+ model: opus
32
+ parallel: false
33
+ validation:
34
+ agents: [elsabro-verifier]
35
+ model: sonnet
36
+ parallel: false
14
37
  ---
15
38
 
16
39
  # ELSABRO: Plan
17
40
 
41
+ <state_sync>
42
+ ## SINCRONIZACIÓN DE ESTADO (OBLIGATORIO)
43
+
44
+ **IMPORTAR**: Este comando DEBE seguir `/references/state-sync.md` y `/references/enforcement-rules.md`.
45
+
46
+ ### Al Iniciar (ANTES de cualquier operación)
47
+
48
+ ```javascript
49
+ // 1. Crear task de inicialización
50
+ TaskCreate({
51
+ subject: "Initialize plan command",
52
+ description: "Leer estado y preparar planificación",
53
+ activeForm: "Inicializando..."
54
+ })
55
+ TaskUpdate(id, status: "in_progress")
56
+
57
+ // 2. Leer estado existente
58
+ const state = Read(".elsabro/state.json") || createInitialState();
59
+
60
+ // 3. Verificar flujo en progreso
61
+ if (state.current_flow && state.current_flow.command !== "plan") {
62
+ AskUserQuestion({
63
+ questions: [{
64
+ question: `Hay un flujo de "${state.current_flow.command}" en progreso. ¿Continuar ese o empezar plan?`,
65
+ header: "Flujo",
66
+ options: [
67
+ { label: "Continuar anterior", description: "Retomar " + state.current_flow.command },
68
+ { label: "Empezar plan", description: "Pausar anterior" }
69
+ ]
70
+ }]
71
+ });
72
+ }
73
+
74
+ // 4. Verificar contexto de start (si viene de ahí)
75
+ if (state.history.length > 0 && state.history[state.history.length - 1].command === "start") {
76
+ // Heredar contexto de start
77
+ console.log("Contexto heredado de start:", state.context);
78
+ }
79
+
80
+ // 5. Actualizar estado
81
+ state.current_flow = { command: "plan", phase: "initializing", started_at: new Date().toISOString() };
82
+ Write(".elsabro/state.json", JSON.stringify(state, null, 2));
83
+
84
+ // 6. Completar task de inicialización
85
+ TaskUpdate(id, status: "completed")
86
+ ```
87
+
88
+ ### Al Cambiar de Fase
89
+
90
+ ```javascript
91
+ // Antes de exploración
92
+ state.current_flow.phase = "exploring";
93
+ Write(".elsabro/state.json", JSON.stringify(state, null, 2));
94
+
95
+ // Antes de research
96
+ state.current_flow.phase = "researching";
97
+ Write(".elsabro/state.json", JSON.stringify(state, null, 2));
98
+
99
+ // Antes de planning
100
+ state.current_flow.phase = "planning";
101
+ Write(".elsabro/state.json", JSON.stringify(state, null, 2));
102
+
103
+ // Antes de validación
104
+ state.current_flow.phase = "validating";
105
+ Write(".elsabro/state.json", JSON.stringify(state, null, 2));
106
+ ```
107
+
108
+ ### Al Completar
109
+
110
+ ```javascript
111
+ // Registrar en historial
112
+ state.history.push({
113
+ command: "plan",
114
+ completed_at: new Date().toISOString(),
115
+ result: "created",
116
+ artifact: planFilePath // ".planning/01-01-PLAN.md"
117
+ });
118
+
119
+ // Pasar contexto a execute
120
+ state.context.plan_file = planFilePath;
121
+ state.context.tech_stack = verifiedTechStack;
122
+ state.context.ready_for_execution = true;
123
+
124
+ // Limpiar flujo y sugerir siguiente
125
+ state.current_flow = null;
126
+ state.suggested_next = "execute";
127
+
128
+ Write(".elsabro/state.json", JSON.stringify(state, null, 2));
129
+
130
+ // Actualizar context.md legible
131
+ Write(".elsabro/context.md", generateHumanReadableContext(state));
132
+ ```
133
+ </state_sync>
134
+
18
135
  <objective>
19
136
  Crear un plan ejecutable para una fase o feature, con investigación previa usando Context7 y WebSearch.
137
+
138
+ **Dispatcher Integration:** Este comando usa selección automática de modelo:
139
+ - **Exploración (HAIKU x3):** Buscar archivos, analizar patrones, mapear arquitectura
140
+ - **Planificación (OPUS x1):** Crear RESEARCH.md y PLAN.md
141
+ - **Validación (SONNET x1):** Verificar que el plan es ejecutable
20
142
  </objective>
21
143
 
144
+ <dispatcher_flow>
145
+ ## Flujo de Ejecución por Subagentes
146
+
147
+ ```
148
+ ┌─────────────────────────────────────────────────────────────────────────┐
149
+ │ FLUJO /elsabro:plan │
150
+ ├─────────────────────────────────────────────────────────────────────────┤
151
+ │ │
152
+ │ FASE 1: EXPLORACIÓN (HAIKU x3 paralelo) │
153
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
154
+ │ │ Explore │ │ code-explor │ │ Plan │ │
155
+ │ │ (haiku) │ │ (haiku) │ │ (haiku) │ │
156
+ │ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
157
+ │ │ │ │ │
158
+ │ └────────────────┼────────────────┘ │
159
+ │ ▼ │
160
+ │ FASE 2: PLANIFICACIÓN (OPUS x1) │
161
+ │ ┌─────────────────────────────────────────────────────────┐ │
162
+ │ │ elsabro-planner (opus) │ │
163
+ │ │ - Crea RESEARCH.md con Context7 │ │
164
+ │ │ - Crea PLAN.md con tareas atómicas │ │
165
+ │ └────────────────────────┬────────────────────────────────┘ │
166
+ │ │ │
167
+ │ ▼ │
168
+ │ FASE 3: VALIDACIÓN (SONNET x1) │
169
+ │ ┌─────────────────────────────────────────────────────────┐ │
170
+ │ │ elsabro-verifier (sonnet) │ │
171
+ │ │ - Verifica <verify> ejecutables │ │
172
+ │ │ - Valida must_haves observables │ │
173
+ │ └─────────────────────────────────────────────────────────┘ │
174
+ │ │
175
+ └─────────────────────────────────────────────────────────────────────────┘
176
+ ```
177
+ </dispatcher_flow>
178
+
22
179
  <process>
23
180
  ## Paso 1: Entender Qué Planificar
24
181
 
@@ -43,52 +200,123 @@ Leer:
43
200
  - `.planning/ROADMAP.md` (si planificando fase)
44
201
  - `.planning/config.json` (para preferencias)
45
202
 
46
- ## Paso 4: Research-Before-Plan
47
-
48
- **OBLIGATORIO:** Investigar antes de planificar.
49
-
50
- Spawn agentes en paralelo:
51
-
203
+ ## Paso 4: Exploración Pre-Planificación (HAIKU x3 paralelo)
204
+
205
+ **OBLIGATORIO:** Explorar el codebase antes de planificar.
206
+
207
+ ```javascript
208
+ // Crear tasks de exploración
209
+ TaskCreate({
210
+ subject: "Explore: Related files",
211
+ activeForm: "Buscando archivos relacionados...",
212
+ metadata: { type: "exploration", model: "haiku" }
213
+ })
214
+
215
+ TaskCreate({
216
+ subject: "Explore: Existing patterns",
217
+ activeForm: "Analizando patrones...",
218
+ metadata: { type: "exploration", model: "haiku" }
219
+ })
220
+
221
+ TaskCreate({
222
+ subject: "Explore: Architecture map",
223
+ activeForm: "Mapeando arquitectura...",
224
+ metadata: { type: "exploration", model: "haiku" }
225
+ })
226
+
227
+ // Lanzar 3 agentes HAIKU EN PARALELO (UN SOLO MENSAJE)
228
+ Task({
229
+ subagent_type: "Explore",
230
+ model: "haiku", // ← HAIKU para exploración
231
+ description: "Buscar archivos relacionados",
232
+ prompt: "Busca archivos relacionados con la fase/feature. Lista los 10 más relevantes."
233
+ }) |
234
+ Task({
235
+ subagent_type: "feature-dev:code-explorer",
236
+ model: "haiku", // ← HAIKU para exploración
237
+ description: "Analizar patrones existentes",
238
+ prompt: "Analiza patrones de arquitectura, convenciones y dependencias del área."
239
+ }) |
240
+ Task({
241
+ subagent_type: "Plan",
242
+ model: "haiku", // ← HAIKU para exploración
243
+ description: "Mapear arquitectura",
244
+ prompt: "Mapea componentes, flujo de datos y puntos de integración."
245
+ })
52
246
  ```
53
- Task(elsabro-planner, model: sonnet):
54
- Fase/Feature: [descripción]
55
-
56
- Contexto del proyecto:
57
- [Resumen de PROJECT.md]
58
-
59
- Tu trabajo:
60
- 1. Identificar tecnologías necesarias
61
- 2. Buscar en Context7 las APIs actuales
62
- 3. Buscar en WebSearch mejores prácticas [año]
63
- 4. Crear RESEARCH.md con hallazgos
64
- 5. Crear PLAN.md con tareas específicas
65
-
66
- Recuerda:
67
- - Context7 PRIMERO para cualquier librería
68
- - Máximo 2-3 tareas por plan
69
- - Cada tarea debe ser verificable
247
+
248
+ ## Paso 5: Research-Before-Plan (OPUS x1)
249
+
250
+ **OBLIGATORIO:** Investigar con OPUS antes de planificar.
251
+
252
+ ```javascript
253
+ TaskCreate({
254
+ subject: "Create RESEARCH.md and PLAN.md",
255
+ activeForm: "Investigando y planificando...",
256
+ metadata: { type: "planning", model: "opus" }
257
+ })
258
+
259
+ // Lanzar agente OPUS para planificación
260
+ Task({
261
+ subagent_type: "elsabro-planner",
262
+ model: "opus", // OPUS para planificación profunda
263
+ description: "Crear plan ejecutable",
264
+ prompt: `
265
+ Fase/Feature: [descripción]
266
+
267
+ Contexto del proyecto:
268
+ [Resumen de PROJECT.md]
269
+
270
+ Hallazgos de exploración:
271
+ [Resultados de HAIKU agents]
272
+
273
+ Tu trabajo:
274
+ 1. Identificar tecnologías necesarias
275
+ 2. Buscar en Context7 las APIs actuales
276
+ 3. Buscar en WebSearch mejores prácticas 2026
277
+ 4. Crear RESEARCH.md con hallazgos
278
+ 5. Crear PLAN.md con tareas específicas
279
+
280
+ Recuerda:
281
+ - Context7 PRIMERO para cualquier librería
282
+ - Máximo 2-3 tareas por plan
283
+ - Cada tarea debe ser verificable
284
+ `
285
+ })
70
286
  ```
71
287
 
72
- ## Paso 5: Crear Archivos
288
+ ## Paso 6: Crear Archivos
73
289
 
74
290
  El planner crea:
75
291
  - `.planning/{phase}-RESEARCH.md`
76
292
  - `.planning/{phase}-{N}-PLAN.md`
77
293
 
78
- ## Paso 6: Verificar Plan (Opcional)
79
-
80
- Si `plan_check: true` en config.json:
81
-
82
- ```
83
- Task(elsabro-verifier, model: haiku):
84
- Verifica que los planes cumplen:
85
- - Cada tarea tiene <verify> ejecutable
86
- - Los must_haves son observables
87
- - No hay dependencias circulares
88
- - El scope es razonable (~50% context)
294
+ ## Paso 7: Verificar Plan (SONNET x1)
295
+
296
+ **SIEMPRE** verificar que el plan es ejecutable:
297
+
298
+ ```javascript
299
+ TaskCreate({
300
+ subject: "Validate plan",
301
+ activeForm: "Validando plan...",
302
+ metadata: { type: "validation", model: "sonnet" }
303
+ })
304
+
305
+ Task({
306
+ subagent_type: "elsabro-verifier",
307
+ model: "sonnet", // ← SONNET para validación estructurada
308
+ description: "Validar plan",
309
+ prompt: `
310
+ Verifica que los planes cumplen:
311
+ - Cada tarea tiene <verify> ejecutable
312
+ - Los must_haves son observables
313
+ - No hay dependencias circulares
314
+ - El scope es razonable (~50% context)
315
+ `
316
+ })
89
317
  ```
90
318
 
91
- ## Paso 7: Presentar al Usuario
319
+ ## Paso 8: Presentar al Usuario
92
320
 
93
321
  ```
94
322
  Plan creado para: [fase/feature]