elsabro 2.0.1 → 2.2.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/commands/elsabro/add-phase.md +17 -0
- package/commands/elsabro/add-todo.md +111 -53
- package/commands/elsabro/audit-milestone.md +19 -0
- package/commands/elsabro/check-todos.md +210 -31
- package/commands/elsabro/complete-milestone.md +20 -1
- package/commands/elsabro/debug.md +19 -0
- package/commands/elsabro/discuss-phase.md +18 -1
- package/commands/elsabro/execute.md +496 -52
- package/commands/elsabro/insert-phase.md +18 -1
- package/commands/elsabro/list-phase-assumptions.md +17 -0
- package/commands/elsabro/new-milestone.md +19 -0
- package/commands/elsabro/new.md +19 -0
- package/commands/elsabro/pause-work.md +75 -0
- package/commands/elsabro/plan-milestone-gaps.md +20 -1
- package/commands/elsabro/plan.md +264 -36
- package/commands/elsabro/progress.md +203 -79
- package/commands/elsabro/quick.md +19 -0
- package/commands/elsabro/remove-phase.md +17 -0
- package/commands/elsabro/research-phase.md +18 -1
- package/commands/elsabro/resume-work.md +130 -2
- package/commands/elsabro/start.md +365 -98
- package/commands/elsabro/verify-work.md +271 -12
- package/package.json +1 -1
- package/references/SYSTEM_INDEX.md +241 -0
- package/references/command-flow.md +352 -0
- package/references/enforcement-rules.md +331 -0
- package/references/error-handling-instructions.md +26 -12
- package/references/state-sync.md +381 -0
- package/references/task-dispatcher.md +388 -0
- package/references/tasks-integration.md +380 -0
- package/skills/api-microservice.md +765 -0
- package/skills/api-setup.md +76 -3
- package/skills/auth-setup.md +46 -6
- package/skills/chrome-extension.md +584 -0
- package/skills/cicd-setup.md +1206 -0
- package/skills/cli-tool.md +884 -0
- package/skills/database-setup.md +41 -5
- package/skills/desktop-app.md +1351 -0
- package/skills/expo-app.md +35 -2
- package/skills/full-stack-app.md +543 -0
- package/skills/mobile-app.md +813 -0
- package/skills/nextjs-app.md +33 -2
- package/skills/payments-setup.md +76 -1
- package/skills/saas-starter.md +639 -0
- package/skills/sentry-setup.md +41 -7
- package/skills/testing-setup.md +1218 -0
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: discuss-phase
|
|
3
|
-
description:
|
|
3
|
+
description: Discusion colaborativa sobre una fase - clarificar scope, identificar riesgos, refinar approach
|
|
4
|
+
sync:
|
|
5
|
+
reads: [".elsabro/state.json"]
|
|
6
|
+
writes: [".elsabro/state.json"]
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# /elsabro:discuss-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>discuss-phase</command-name>
|
|
9
26
|
|
|
10
27
|
## Propósito
|
|
@@ -9,21 +9,229 @@ allowed-tools:
|
|
|
9
9
|
- Glob
|
|
10
10
|
- Grep
|
|
11
11
|
- Task
|
|
12
|
+
- TaskCreate
|
|
13
|
+
- TaskUpdate
|
|
14
|
+
- TaskList
|
|
15
|
+
- TaskGet
|
|
16
|
+
- AskUserQuestion
|
|
12
17
|
- mcp__plugin_context7_context7__*
|
|
13
18
|
argument-hint: "[número de fase]"
|
|
19
|
+
sync:
|
|
20
|
+
reads: [".elsabro/state.json", ".planning/*-PLAN.md"]
|
|
21
|
+
writes: [".elsabro/state.json", ".elsabro/context.md"]
|
|
22
|
+
phases: ["initializing", "exploring", "executing_wave_N", "verifying", "done"]
|
|
23
|
+
passes_context_to: ["verify-work"]
|
|
24
|
+
dispatcher:
|
|
25
|
+
exploration:
|
|
26
|
+
agents: [Explore, feature-dev:code-explorer, Plan]
|
|
27
|
+
model: haiku
|
|
28
|
+
parallel: true
|
|
29
|
+
min_agents: 3
|
|
30
|
+
implementation:
|
|
31
|
+
agents: [elsabro-executor, feature-dev:code-architect]
|
|
32
|
+
model: opus
|
|
33
|
+
parallel: true
|
|
34
|
+
min_agents: 2
|
|
35
|
+
verification:
|
|
36
|
+
agents: [pr-review-toolkit:code-reviewer, pr-review-toolkit:silent-failure-hunter, pr-review-toolkit:pr-test-analyzer]
|
|
37
|
+
model: opus
|
|
38
|
+
parallel: true
|
|
39
|
+
min_agents: 3
|
|
14
40
|
---
|
|
15
41
|
|
|
16
42
|
# ELSABRO: Execute
|
|
17
43
|
|
|
44
|
+
<state_sync>
|
|
45
|
+
## SINCRONIZACIÓN DE ESTADO (OBLIGATORIO)
|
|
46
|
+
|
|
47
|
+
**IMPORTAR**: Este comando DEBE seguir `/references/state-sync.md` y `/references/enforcement-rules.md`.
|
|
48
|
+
|
|
49
|
+
### Al Iniciar (ANTES de cualquier operación)
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
// 1. Crear task de inicialización
|
|
53
|
+
TaskCreate({
|
|
54
|
+
subject: "Initialize execute command",
|
|
55
|
+
description: "Leer estado y preparar ejecución",
|
|
56
|
+
activeForm: "Inicializando..."
|
|
57
|
+
})
|
|
58
|
+
TaskUpdate(id, status: "in_progress")
|
|
59
|
+
|
|
60
|
+
// 2. Leer estado existente
|
|
61
|
+
const state = Read(".elsabro/state.json") || createInitialState();
|
|
62
|
+
|
|
63
|
+
// 3. Verificar flujo en progreso
|
|
64
|
+
if (state.current_flow && state.current_flow.command !== "execute") {
|
|
65
|
+
AskUserQuestion({
|
|
66
|
+
questions: [{
|
|
67
|
+
question: `Hay un flujo de "${state.current_flow.command}" en progreso. ¿Continuar ese o empezar execute?`,
|
|
68
|
+
header: "Flujo",
|
|
69
|
+
options: [
|
|
70
|
+
{ label: "Continuar anterior", description: "Retomar " + state.current_flow.command },
|
|
71
|
+
{ label: "Empezar execute", description: "Pausar anterior" }
|
|
72
|
+
]
|
|
73
|
+
}]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 4. Actualizar estado
|
|
78
|
+
state.current_flow = { command: "execute", phase: "initializing", started_at: new Date().toISOString() };
|
|
79
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
80
|
+
|
|
81
|
+
// 5. Completar task de inicialización
|
|
82
|
+
TaskUpdate(id, status: "completed")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Al Cambiar de Fase
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
// Antes de exploración
|
|
89
|
+
state.current_flow.phase = "exploring";
|
|
90
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
91
|
+
|
|
92
|
+
// Antes de cada wave
|
|
93
|
+
state.current_flow.phase = "executing_wave_" + waveNumber;
|
|
94
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
95
|
+
|
|
96
|
+
// Antes de verificación
|
|
97
|
+
state.current_flow.phase = "verifying";
|
|
98
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Al Completar
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
// Registrar en historial
|
|
105
|
+
state.history.push({
|
|
106
|
+
command: "execute",
|
|
107
|
+
completed_at: new Date().toISOString(),
|
|
108
|
+
result: "completed_phase_" + phaseNumber,
|
|
109
|
+
artifact: null
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// Pasar contexto a verify-work
|
|
113
|
+
state.context.changed_files = [...changedFiles];
|
|
114
|
+
state.context.commits = [...commitIds];
|
|
115
|
+
state.context.tests_added = [...testFiles];
|
|
116
|
+
state.context.phase_completed = phaseNumber;
|
|
117
|
+
|
|
118
|
+
// Limpiar flujo y sugerir siguiente
|
|
119
|
+
state.current_flow = null;
|
|
120
|
+
state.suggested_next = "verify-work";
|
|
121
|
+
|
|
122
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
123
|
+
|
|
124
|
+
// Actualizar context.md legible
|
|
125
|
+
Write(".elsabro/context.md", generateHumanReadableContext(state));
|
|
126
|
+
```
|
|
127
|
+
</state_sync>
|
|
128
|
+
|
|
18
129
|
<objective>
|
|
19
130
|
Ejecutar planes de una fase con:
|
|
131
|
+
- **Sistema de Tasks para tracking real** de waves y dependencias
|
|
132
|
+
- **Dispatcher inteligente con selección automática de modelo** (ver @references/task-dispatcher.md)
|
|
133
|
+
- **Ejecución por subagentes en paralelo** según tipo de tarea
|
|
20
134
|
- Investigación de patrones con Context7
|
|
21
135
|
- TDD cuando sea apropiado
|
|
22
136
|
- Commits atómicos por tarea
|
|
23
|
-
- Verificación automática
|
|
137
|
+
- Verificación automática con agregador
|
|
24
138
|
</objective>
|
|
25
139
|
|
|
140
|
+
<dispatcher_integration>
|
|
141
|
+
## Selección Automática de Modelo
|
|
142
|
+
|
|
143
|
+
**REGLA CRÍTICA:** Cada tarea se ejecuta con el modelo óptimo para su tipo.
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
147
|
+
│ MODELO SEGÚN FASE │
|
|
148
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
149
|
+
│ FASE │ SUBAGENTES │ MODELO │
|
|
150
|
+
├────────────────────┼────────────────────────────────────┼───────────────┤
|
|
151
|
+
│ Exploración │ Explore │ HAIKU │
|
|
152
|
+
│ (pre-ejecución) │ feature-dev:code-explorer │ HAIKU │
|
|
153
|
+
│ │ Plan │ HAIKU │
|
|
154
|
+
│ │ (3 en paralelo obligatorio) │ │
|
|
155
|
+
├────────────────────┼────────────────────────────────────┼───────────────┤
|
|
156
|
+
│ Implementación │ elsabro-executor │ OPUS │
|
|
157
|
+
│ (waves) │ feature-dev:code-architect │ OPUS │
|
|
158
|
+
│ │ (2+ en paralelo por wave) │ │
|
|
159
|
+
├────────────────────┼────────────────────────────────────┼───────────────┤
|
|
160
|
+
│ Verificación │ pr-review-toolkit:code-reviewer │ OPUS │
|
|
161
|
+
│ (post-ejecución) │ pr-review-toolkit:silent-... │ OPUS │
|
|
162
|
+
│ │ pr-review-toolkit:pr-test-... │ OPUS │
|
|
163
|
+
│ │ (3 en paralelo obligatorio) │ │
|
|
164
|
+
└────────────────────┴────────────────────────────────────┴───────────────┘
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Por qué esta distribución
|
|
168
|
+
|
|
169
|
+
- **HAIKU para exploración:** Solo lee y mapea, no necesita razonamiento profundo
|
|
170
|
+
- **OPUS para implementación:** Escribe código, necesita máxima calidad
|
|
171
|
+
- **OPUS para verificación:** Análisis profundo de bugs y edge cases
|
|
172
|
+
</dispatcher_integration>
|
|
173
|
+
|
|
26
174
|
<process>
|
|
175
|
+
## Paso 0: Exploración Pre-Ejecución (HAIKU x3 paralelo)
|
|
176
|
+
|
|
177
|
+
**OBLIGATORIO:** Antes de ejecutar, explorar el codebase para entender contexto.
|
|
178
|
+
|
|
179
|
+
```javascript
|
|
180
|
+
// Crear tasks de exploración
|
|
181
|
+
TaskCreate({
|
|
182
|
+
subject: "Explore: Find related files",
|
|
183
|
+
description: "Buscar archivos relacionados con la fase",
|
|
184
|
+
activeForm: "Buscando archivos...",
|
|
185
|
+
metadata: { type: "exploration", model: "haiku" }
|
|
186
|
+
}) // → explore-files-id
|
|
187
|
+
|
|
188
|
+
TaskCreate({
|
|
189
|
+
subject: "Explore: Analyze patterns",
|
|
190
|
+
description: "Analizar patrones existentes en el codebase",
|
|
191
|
+
activeForm: "Analizando patrones...",
|
|
192
|
+
metadata: { type: "exploration", model: "haiku" }
|
|
193
|
+
}) // → explore-patterns-id
|
|
194
|
+
|
|
195
|
+
TaskCreate({
|
|
196
|
+
subject: "Explore: Map architecture",
|
|
197
|
+
description: "Mapear arquitectura del área afectada",
|
|
198
|
+
activeForm: "Mapeando arquitectura...",
|
|
199
|
+
metadata: { type: "exploration", model: "haiku" }
|
|
200
|
+
}) // → explore-arch-id
|
|
201
|
+
|
|
202
|
+
// Marcar todas como in_progress
|
|
203
|
+
TaskUpdate({ taskId: "explore-files-id", status: "in_progress" })
|
|
204
|
+
TaskUpdate({ taskId: "explore-patterns-id", status: "in_progress" })
|
|
205
|
+
TaskUpdate({ taskId: "explore-arch-id", status: "in_progress" })
|
|
206
|
+
|
|
207
|
+
// Lanzar 3 agentes HAIKU EN PARALELO (UN SOLO MENSAJE)
|
|
208
|
+
Task({
|
|
209
|
+
subagent_type: "Explore",
|
|
210
|
+
model: "haiku",
|
|
211
|
+
description: "Buscar archivos relacionados",
|
|
212
|
+
prompt: "Busca archivos relacionados con la fase [N]. Lista los 10 más relevantes."
|
|
213
|
+
}) |
|
|
214
|
+
Task({
|
|
215
|
+
subagent_type: "feature-dev:code-explorer",
|
|
216
|
+
model: "haiku",
|
|
217
|
+
description: "Analizar patrones",
|
|
218
|
+
prompt: "Analiza patrones de arquitectura en el área de la fase [N]."
|
|
219
|
+
}) |
|
|
220
|
+
Task({
|
|
221
|
+
subagent_type: "Plan",
|
|
222
|
+
model: "haiku",
|
|
223
|
+
description: "Mapear arquitectura",
|
|
224
|
+
prompt: "Mapea componentes y flujo de datos del área afectada."
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
// Marcar completed
|
|
228
|
+
TaskUpdate({ taskId: "explore-files-id", status: "completed" })
|
|
229
|
+
TaskUpdate({ taskId: "explore-patterns-id", status: "completed" })
|
|
230
|
+
TaskUpdate({ taskId: "explore-arch-id", status: "completed" })
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Resultado:** Contexto del codebase capturado antes de modificar nada.
|
|
234
|
+
|
|
27
235
|
## Paso 1: Descubrir Planes
|
|
28
236
|
|
|
29
237
|
```bash
|
|
@@ -32,48 +240,210 @@ ls .planning/*-PLAN.md
|
|
|
32
240
|
|
|
33
241
|
Encontrar planes para la fase especificada.
|
|
34
242
|
|
|
35
|
-
## Paso 2:
|
|
243
|
+
## Paso 2: Crear Estructura de Tasks
|
|
36
244
|
|
|
245
|
+
### 2.1 Crear Task coordinadora de fase
|
|
246
|
+
```javascript
|
|
247
|
+
TaskCreate({
|
|
248
|
+
subject: "Execute Phase [N]",
|
|
249
|
+
description: "Coordinar ejecución de todos los planes de la fase",
|
|
250
|
+
activeForm: "Ejecutando Fase [N]...",
|
|
251
|
+
metadata: { phase: N, type: "coordinator" }
|
|
252
|
+
}) // → phase-coordinator-id
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### 2.2 Organizar por Waves y crear Tasks
|
|
37
256
|
Leer frontmatter de cada plan para agrupar por `wave`:
|
|
38
257
|
|
|
258
|
+
```javascript
|
|
259
|
+
// Para cada wave, crear task coordinadora
|
|
260
|
+
TaskCreate({
|
|
261
|
+
subject: "Execute Wave [W]",
|
|
262
|
+
description: "Plans: A, B, C en paralelo",
|
|
263
|
+
activeForm: "Ejecutando Wave [W]...",
|
|
264
|
+
metadata: { wave: W, plans: ["A", "B", "C"] }
|
|
265
|
+
}) // → wave-W-id
|
|
266
|
+
|
|
267
|
+
// Wave 2+ tiene dependencia de wave anterior
|
|
268
|
+
TaskUpdate({
|
|
269
|
+
taskId: "wave-2-id",
|
|
270
|
+
addBlockedBy: ["wave-1-id"]
|
|
271
|
+
})
|
|
39
272
|
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
273
|
+
|
|
274
|
+
### 2.3 Crear Tasks por plan dentro de cada wave
|
|
275
|
+
```javascript
|
|
276
|
+
TaskCreate({
|
|
277
|
+
subject: "Execute Plan [name]",
|
|
278
|
+
description: "TDD + commits para plan específico",
|
|
279
|
+
activeForm: "Ejecutando Plan [name]...",
|
|
280
|
+
metadata: { wave: W, plan: "name", type: "executor" }
|
|
281
|
+
}) // → plan-X-id
|
|
282
|
+
|
|
283
|
+
// Bloquear por wave coordinator
|
|
284
|
+
TaskUpdate({
|
|
285
|
+
taskId: "plan-X-id",
|
|
286
|
+
addBlockedBy: ["wave-W-id"]
|
|
287
|
+
})
|
|
43
288
|
```
|
|
44
289
|
|
|
45
|
-
## Paso 3: Ejecutar Waves
|
|
290
|
+
## Paso 3: Ejecutar Waves con Tracking
|
|
46
291
|
|
|
47
292
|
Para cada wave:
|
|
48
293
|
|
|
49
|
-
###
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Task(elsabro-executor) para Plan 2 |
|
|
53
|
-
Task(elsabro-executor) para Plan 3
|
|
294
|
+
### Marcar wave como in_progress
|
|
295
|
+
```javascript
|
|
296
|
+
TaskUpdate({ taskId: "wave-W-id", status: "in_progress" })
|
|
54
297
|
```
|
|
55
298
|
|
|
56
|
-
### Si
|
|
57
|
-
```
|
|
58
|
-
|
|
299
|
+
### Si hay múltiples planes en la wave → Paralelo (OPUS)
|
|
300
|
+
```javascript
|
|
301
|
+
// Marcar todos los planes como in_progress
|
|
302
|
+
TaskUpdate({ taskId: "plan-A-id", status: "in_progress" })
|
|
303
|
+
TaskUpdate({ taskId: "plan-B-id", status: "in_progress" })
|
|
304
|
+
TaskUpdate({ taskId: "plan-C-id", status: "in_progress" })
|
|
305
|
+
|
|
306
|
+
// Lanzar agentes OPUS en paralelo (UN SOLO MENSAJE)
|
|
307
|
+
// MODELO: OPUS porque escriben código
|
|
308
|
+
Task({
|
|
309
|
+
subagent_type: "elsabro-executor",
|
|
310
|
+
model: "opus", // ← OPUS para implementación
|
|
311
|
+
description: "Ejecutar Plan A",
|
|
312
|
+
prompt: "Implementa el Plan A siguiendo TDD..."
|
|
313
|
+
}) |
|
|
314
|
+
Task({
|
|
315
|
+
subagent_type: "elsabro-executor",
|
|
316
|
+
model: "opus", // ← OPUS para implementación
|
|
317
|
+
description: "Ejecutar Plan B",
|
|
318
|
+
prompt: "Implementa el Plan B siguiendo TDD..."
|
|
319
|
+
}) |
|
|
320
|
+
Task({
|
|
321
|
+
subagent_type: "elsabro-executor",
|
|
322
|
+
model: "opus", // ← OPUS para implementación
|
|
323
|
+
description: "Ejecutar Plan C",
|
|
324
|
+
prompt: "Implementa el Plan C siguiendo TDD..."
|
|
325
|
+
})
|
|
326
|
+
|
|
327
|
+
// Al completar cada plan
|
|
328
|
+
TaskUpdate({ taskId: "plan-A-id", status: "completed" })
|
|
59
329
|
```
|
|
60
330
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
-
|
|
331
|
+
### Validación arquitectónica en paralelo (OPUS x2)
|
|
332
|
+
```javascript
|
|
333
|
+
// Además de implementar, validar arquitectura en paralelo
|
|
334
|
+
Task({
|
|
335
|
+
subagent_type: "elsabro-executor",
|
|
336
|
+
model: "opus",
|
|
337
|
+
description: "Implementar cambios",
|
|
338
|
+
prompt: "..."
|
|
339
|
+
}) |
|
|
340
|
+
Task({
|
|
341
|
+
subagent_type: "feature-dev:code-architect",
|
|
342
|
+
model: "opus", // ← OPUS para decisiones arquitectónicas
|
|
343
|
+
description: "Validar arquitectura",
|
|
344
|
+
prompt: "Verifica que la implementación sigue los patrones del codebase..."
|
|
345
|
+
})
|
|
346
|
+
```
|
|
66
347
|
|
|
67
|
-
|
|
348
|
+
### Si solo hay un plan → Secuencial (OPUS)
|
|
349
|
+
```javascript
|
|
350
|
+
TaskUpdate({ taskId: "plan-X-id", status: "in_progress" })
|
|
351
|
+
Task({
|
|
352
|
+
subagent_type: "elsabro-executor",
|
|
353
|
+
model: "opus", // ← OPUS porque escribe código
|
|
354
|
+
description: "Ejecutar plan único",
|
|
355
|
+
prompt: "..."
|
|
356
|
+
})
|
|
357
|
+
TaskUpdate({ taskId: "plan-X-id", status: "completed" })
|
|
358
|
+
```
|
|
68
359
|
|
|
69
|
-
|
|
360
|
+
### Marcar wave como completed cuando todos sus planes terminen
|
|
361
|
+
```javascript
|
|
362
|
+
TaskUpdate({ taskId: "wave-W-id", status: "completed" })
|
|
363
|
+
// → Wave W+1 se desbloquea automáticamente
|
|
364
|
+
```
|
|
70
365
|
|
|
366
|
+
## Paso 4: Verificar Fase (con Agregador)
|
|
367
|
+
|
|
368
|
+
### 4.1 Crear tasks de verificación
|
|
369
|
+
```javascript
|
|
370
|
+
TaskCreate({
|
|
371
|
+
subject: "Verify Functional Requirements",
|
|
372
|
+
activeForm: "Verificando funcionalidad...",
|
|
373
|
+
metadata: { type: "verifier", area: "functional" }
|
|
374
|
+
}) // → verify-functional-id
|
|
375
|
+
|
|
376
|
+
TaskCreate({
|
|
377
|
+
subject: "Verify Quality Metrics",
|
|
378
|
+
activeForm: "Verificando calidad...",
|
|
379
|
+
metadata: { type: "verifier", area: "quality" }
|
|
380
|
+
}) // → verify-quality-id
|
|
381
|
+
|
|
382
|
+
TaskCreate({
|
|
383
|
+
subject: "Verify Phase Completion",
|
|
384
|
+
activeForm: "Agregando resultados...",
|
|
385
|
+
metadata: { type: "aggregator" }
|
|
386
|
+
}) // → verify-aggregate-id
|
|
387
|
+
|
|
388
|
+
// Agregador espera a todos los verificadores
|
|
389
|
+
TaskUpdate({
|
|
390
|
+
taskId: "verify-aggregate-id",
|
|
391
|
+
addBlockedBy: ["verify-functional-id", "verify-quality-id"]
|
|
392
|
+
})
|
|
71
393
|
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
394
|
+
|
|
395
|
+
### 4.2 Ejecutar verificación en paralelo (OPUS x3)
|
|
396
|
+
|
|
397
|
+
**OBLIGATORIO:** Usar 3 agentes OPUS para verificación profunda.
|
|
398
|
+
|
|
399
|
+
```javascript
|
|
400
|
+
// Crear task adicional de seguridad
|
|
401
|
+
TaskCreate({
|
|
402
|
+
subject: "Verify Security & Edge Cases",
|
|
403
|
+
activeForm: "Verificando seguridad...",
|
|
404
|
+
metadata: { type: "verifier", area: "security", model: "opus" }
|
|
405
|
+
}) // → verify-security-id
|
|
406
|
+
|
|
407
|
+
// Actualizar agregador para esperar los 3
|
|
408
|
+
TaskUpdate({
|
|
409
|
+
taskId: "verify-aggregate-id",
|
|
410
|
+
addBlockedBy: ["verify-functional-id", "verify-quality-id", "verify-security-id"]
|
|
411
|
+
})
|
|
412
|
+
|
|
413
|
+
// Marcar todos como in_progress
|
|
414
|
+
TaskUpdate({ taskId: "verify-functional-id", status: "in_progress" })
|
|
415
|
+
TaskUpdate({ taskId: "verify-quality-id", status: "in_progress" })
|
|
416
|
+
TaskUpdate({ taskId: "verify-security-id", status: "in_progress" })
|
|
417
|
+
|
|
418
|
+
// Lanzar 3 agentes OPUS EN PARALELO (UN SOLO MENSAJE)
|
|
419
|
+
Task({
|
|
420
|
+
subagent_type: "pr-review-toolkit:code-reviewer",
|
|
421
|
+
model: "opus", // ← OPUS para análisis profundo
|
|
422
|
+
description: "Code review completo",
|
|
423
|
+
prompt: "Revisa los cambios buscando bugs, code smells, mejores prácticas..."
|
|
424
|
+
}) |
|
|
425
|
+
Task({
|
|
426
|
+
subagent_type: "pr-review-toolkit:silent-failure-hunter",
|
|
427
|
+
model: "opus", // ← OPUS para edge cases
|
|
428
|
+
description: "Buscar errores ocultos",
|
|
429
|
+
prompt: "Busca errores silenciosos, try/catch que ocultan errores, fallbacks problemáticos..."
|
|
430
|
+
}) |
|
|
431
|
+
Task({
|
|
432
|
+
subagent_type: "pr-review-toolkit:pr-test-analyzer",
|
|
433
|
+
model: "opus", // ← OPUS para análisis de tests
|
|
434
|
+
description: "Analizar cobertura de tests",
|
|
435
|
+
prompt: "Verifica que los tests cubren los cambios, busca casos críticos sin test..."
|
|
436
|
+
})
|
|
437
|
+
|
|
438
|
+
// Marcar completed al terminar
|
|
439
|
+
TaskUpdate({ taskId: "verify-functional-id", status: "completed" })
|
|
440
|
+
TaskUpdate({ taskId: "verify-quality-id", status: "completed" })
|
|
441
|
+
TaskUpdate({ taskId: "verify-security-id", status: "completed" })
|
|
442
|
+
|
|
443
|
+
// Agregador se desbloquea y genera reporte final
|
|
444
|
+
TaskUpdate({ taskId: "verify-aggregate-id", status: "in_progress" })
|
|
445
|
+
// ... genera VERIFICATION.md ...
|
|
446
|
+
TaskUpdate({ taskId: "verify-aggregate-id", status: "completed" })
|
|
77
447
|
```
|
|
78
448
|
|
|
79
449
|
## Paso 5: Manejar Resultados
|
|
@@ -163,24 +533,59 @@ git commit -m "feat([fase]-[plan]): [descripción]"
|
|
|
163
533
|
</execution_protocol>
|
|
164
534
|
|
|
165
535
|
<parallel_execution>
|
|
166
|
-
## Ejecución Paralela
|
|
536
|
+
## Ejecución Paralela con Tasks
|
|
167
537
|
|
|
168
538
|
### Cuándo usar paralelo
|
|
169
539
|
- Múltiples planes en la misma wave
|
|
170
540
|
- Tareas independientes (sin dependencias)
|
|
171
541
|
|
|
172
|
-
### Cómo paralelizar
|
|
542
|
+
### Cómo paralelizar CON TRACKING
|
|
543
|
+
```javascript
|
|
544
|
+
// 1. Crear tasks para cada plan
|
|
545
|
+
const planATask = TaskCreate({ subject: "Plan A", activeForm: "Ejecutando Plan A..." })
|
|
546
|
+
const planBTask = TaskCreate({ subject: "Plan B", activeForm: "Ejecutando Plan B..." })
|
|
547
|
+
const planCTask = TaskCreate({ subject: "Plan C", activeForm: "Ejecutando Plan C..." })
|
|
548
|
+
|
|
549
|
+
// 2. Marcar todas como in_progress
|
|
550
|
+
TaskUpdate({ taskId: planATask.id, status: "in_progress" })
|
|
551
|
+
TaskUpdate({ taskId: planBTask.id, status: "in_progress" })
|
|
552
|
+
TaskUpdate({ taskId: planCTask.id, status: "in_progress" })
|
|
553
|
+
|
|
554
|
+
// 3. Lanzar agentes EN UN SOLO MENSAJE
|
|
555
|
+
Task(elsabro-executor) Plan A |
|
|
556
|
+
Task(elsabro-executor) Plan B |
|
|
557
|
+
Task(elsabro-executor) Plan C
|
|
558
|
+
|
|
559
|
+
// 4. Al completar cada uno
|
|
560
|
+
TaskUpdate({ taskId: planATask.id, status: "completed" })
|
|
561
|
+
// ...
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
### Visualización automática (Ctrl+T)
|
|
173
565
|
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
566
|
+
📋 Execute Phase 3:
|
|
567
|
+
✅ Wave 1 - Completed (3/3 plans)
|
|
568
|
+
🔧 Wave 2 - Executing Plan D... (1/2 plans done)
|
|
569
|
+
✅ Plan D - Completed
|
|
570
|
+
⏳ Plan E - In Progress
|
|
571
|
+
⏳ Wave 3 - Blocked by Wave 2
|
|
572
|
+
⏳ Verification - Blocked by Wave 3
|
|
178
573
|
```
|
|
179
574
|
|
|
180
575
|
### Cuándo NO paralelizar
|
|
181
|
-
- Planes con dependencias entre sí
|
|
576
|
+
- Planes con dependencias entre sí (usar `blockedBy`)
|
|
182
577
|
- Plan 2 necesita output de Plan 1
|
|
183
578
|
- Modifican los mismos archivos
|
|
579
|
+
|
|
580
|
+
### Expresar dependencias entre planes
|
|
581
|
+
```javascript
|
|
582
|
+
// Plan B depende de Plan A
|
|
583
|
+
TaskUpdate({
|
|
584
|
+
taskId: "plan-B-id",
|
|
585
|
+
addBlockedBy: ["plan-A-id"]
|
|
586
|
+
})
|
|
587
|
+
// Plan B no puede empezar hasta que Plan A complete
|
|
588
|
+
```
|
|
184
589
|
</parallel_execution>
|
|
185
590
|
|
|
186
591
|
<error_handling>
|
|
@@ -248,27 +653,66 @@ Este comando usa **policy: quorum** por defecto.
|
|
|
248
653
|
| Tests fallan | HIGH | Debug o skip |
|
|
249
654
|
| Lint warnings | MEDIUM | Continuar |
|
|
250
655
|
|
|
251
|
-
### Actualizar Estado
|
|
252
|
-
|
|
253
|
-
Después de errores, actualizar
|
|
254
|
-
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
"
|
|
656
|
+
### Actualizar Estado con Tasks
|
|
657
|
+
|
|
658
|
+
Después de errores, actualizar tanto SESSION-STATE.json como Tasks:
|
|
659
|
+
|
|
660
|
+
```javascript
|
|
661
|
+
// 1. Actualizar task con metadata de error
|
|
662
|
+
TaskUpdate({
|
|
663
|
+
taskId: "plan-X-id",
|
|
664
|
+
metadata: {
|
|
665
|
+
error: {
|
|
666
|
+
code: "TESTS_FAILED",
|
|
667
|
+
severity: "HIGH",
|
|
668
|
+
at: "2024-01-20T15:25:00Z",
|
|
669
|
+
attempt: 3,
|
|
670
|
+
maxAttempts: 3
|
|
264
671
|
}
|
|
265
|
-
},
|
|
266
|
-
"retry": {
|
|
267
|
-
"currentAttempt": 3,
|
|
268
|
-
"maxAttempts": 3,
|
|
269
|
-
"exhausted": true
|
|
270
672
|
}
|
|
271
|
-
}
|
|
673
|
+
})
|
|
674
|
+
|
|
675
|
+
// 2. Si retry exhausted, NO marcar completed
|
|
676
|
+
// Crear subtask de fix
|
|
677
|
+
TaskCreate({
|
|
678
|
+
subject: "Fix: Tests failing in Plan X",
|
|
679
|
+
description: "3 retry attempts exhausted, needs manual fix",
|
|
680
|
+
activeForm: "Fixing test failures...",
|
|
681
|
+
metadata: { type: "bugfix", parentPlan: "plan-X-id" }
|
|
682
|
+
}) // → bugfix-id
|
|
683
|
+
|
|
684
|
+
// 3. Bloquear verificación hasta que bugfix complete
|
|
685
|
+
TaskUpdate({
|
|
686
|
+
taskId: "verify-aggregate-id",
|
|
687
|
+
addBlockedBy: ["bugfix-id"]
|
|
688
|
+
})
|
|
689
|
+
|
|
690
|
+
// 4. También actualizar SESSION-STATE.json para compatibilidad
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### Rollback de Estado con Tasks
|
|
694
|
+
|
|
695
|
+
Si necesitas volver a ejecutar un plan:
|
|
696
|
+
|
|
697
|
+
```javascript
|
|
698
|
+
// Volver plan a in_progress (no crear nuevo)
|
|
699
|
+
TaskUpdate({ taskId: "plan-X-id", status: "in_progress" })
|
|
700
|
+
|
|
701
|
+
// Re-ejecutar
|
|
702
|
+
Task(elsabro-executor) para Plan X
|
|
703
|
+
|
|
704
|
+
// Marcar completed cuando funcione
|
|
705
|
+
TaskUpdate({ taskId: "plan-X-id", status: "completed" })
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
### Ver Estado Actual
|
|
709
|
+
|
|
710
|
+
```javascript
|
|
711
|
+
// Listar todas las tasks
|
|
712
|
+
TaskList()
|
|
713
|
+
|
|
714
|
+
// Ver detalles de una task específica
|
|
715
|
+
TaskGet({ taskId: "plan-X-id" })
|
|
272
716
|
```
|
|
273
717
|
</error_handling>
|
|
274
718
|
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: insert-phase
|
|
3
|
-
description: Insertar una nueva fase en una
|
|
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
|