elsabro 3.8.2 → 4.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.
- package/agents/elsabro-orchestrator.md +124 -2
- package/bin/install.js +10 -11
- package/commands/elsabro/execute.md +164 -4
- package/flows/development-flow.json +183 -23
- package/hooks/hooks-config-updated.json +63 -101
- package/hooks/skill-discovery.sh +412 -385
- package/package.json +2 -2
- package/references/agent-teams-integration.md +313 -0
- package/references/flow-orchestration.md +70 -0
- package/templates/skill-marketplace-config.json +57 -358
|
@@ -3,6 +3,12 @@ name: elsabro-orchestrator
|
|
|
3
3
|
description: Orquestador de ejecución paralela. Usa este agente para coordinar múltiples agentes trabajando simultáneamente.
|
|
4
4
|
tools:
|
|
5
5
|
- Task
|
|
6
|
+
- TaskCreate
|
|
7
|
+
- TaskUpdate
|
|
8
|
+
- TaskList
|
|
9
|
+
- TaskGet
|
|
10
|
+
- Teammate
|
|
11
|
+
- SendMessage
|
|
6
12
|
- Read
|
|
7
13
|
- Glob
|
|
8
14
|
- Grep
|
|
@@ -243,7 +249,7 @@ const result = await retryPolicy.executeWithRetry(
|
|
|
243
249
|
║ Agent: elsabro-verifier ║
|
|
244
250
|
║ Error: Timeout after 30 minutes ║
|
|
245
251
|
║ ║
|
|
246
|
-
║ [r] Retry now [
|
|
252
|
+
║ [r] Retry now [d] Debug [a] Abort ║
|
|
247
253
|
╚════════════════════════════════════════════════════╝
|
|
248
254
|
```
|
|
249
255
|
|
|
@@ -338,6 +344,123 @@ Archivos modificados:
|
|
|
338
344
|
- `elsabro-qa` - Para testing paralelo
|
|
339
345
|
</integration_with_elsabro>
|
|
340
346
|
|
|
347
|
+
<agent_teams>
|
|
348
|
+
## Agent Teams Integration (v4.0.0)
|
|
349
|
+
|
|
350
|
+
### Cuándo Usar Agent Teams
|
|
351
|
+
|
|
352
|
+
Como orquestador, decido automáticamente cuándo usar Agent Teams vs Task subagents:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
356
|
+
│ DECISIÓN: ¿Agent Teams o Subagents? │
|
|
357
|
+
├─────────────────────────────────────────────────────────────┤
|
|
358
|
+
│ │
|
|
359
|
+
│ Si profile == "teams": │
|
|
360
|
+
│ → AGENT TEAMS (siempre) │
|
|
361
|
+
│ │
|
|
362
|
+
│ Si complexity == "high" Y implementation: │
|
|
363
|
+
│ → AGENT TEAMS (peer-to-peer coordination) │
|
|
364
|
+
│ │
|
|
365
|
+
│ Si exploration o verification: │
|
|
366
|
+
│ → SUBAGENTS (read-only, no necesita coordinación) │
|
|
367
|
+
│ │
|
|
368
|
+
│ Si complexity == "low" o profile == "yolo": │
|
|
369
|
+
│ → SUBAGENTS (velocidad > coordinación) │
|
|
370
|
+
│ │
|
|
371
|
+
│ Default: │
|
|
372
|
+
│ → SUBAGENTS (menor overhead) │
|
|
373
|
+
│ │
|
|
374
|
+
└─────────────────────────────────────────────────────────────┘
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Spawn Team Pattern
|
|
378
|
+
|
|
379
|
+
```javascript
|
|
380
|
+
// 1. Crear equipo
|
|
381
|
+
Teammate({
|
|
382
|
+
operation: "spawnTeam",
|
|
383
|
+
team_name: "elsabro-wave-N",
|
|
384
|
+
description: "Wave N implementation"
|
|
385
|
+
})
|
|
386
|
+
|
|
387
|
+
// 2. Crear tareas compartidas
|
|
388
|
+
TaskCreate({ subject: "Implement feature A", ... })
|
|
389
|
+
TaskCreate({ subject: "Write tests for A", ... })
|
|
390
|
+
|
|
391
|
+
// 3. Spawn teammates en paralelo
|
|
392
|
+
Task({
|
|
393
|
+
subagent_type: "elsabro-executor",
|
|
394
|
+
team_name: "elsabro-wave-N",
|
|
395
|
+
name: "executor",
|
|
396
|
+
prompt: "Implement feature A..."
|
|
397
|
+
}) |
|
|
398
|
+
Task({
|
|
399
|
+
subagent_type: "elsabro-qa",
|
|
400
|
+
team_name: "elsabro-wave-N",
|
|
401
|
+
name: "qa",
|
|
402
|
+
prompt: "Write tests for feature A..."
|
|
403
|
+
})
|
|
404
|
+
|
|
405
|
+
// 4. Teammates se comunican entre sí con SendMessage
|
|
406
|
+
// executor → qa: "Feature A implementada, estos son los archivos..."
|
|
407
|
+
// qa → executor: "Test falla en edge case X, necesito fix..."
|
|
408
|
+
|
|
409
|
+
// 5. Shutdown y cleanup
|
|
410
|
+
SendMessage({ type: "shutdown_request", recipient: "executor" })
|
|
411
|
+
SendMessage({ type: "shutdown_request", recipient: "qa" })
|
|
412
|
+
Teammate({ operation: "cleanup" })
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Blocking Review con Agent Teams
|
|
416
|
+
|
|
417
|
+
Cuando la implementación usa Agent Teams, el review sigue usando subagents pero con protocolo bloqueante:
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
Agent Team (implementation)
|
|
421
|
+
↓ cleanup team
|
|
422
|
+
Quality Gate (tests, types, lint)
|
|
423
|
+
↓
|
|
424
|
+
Subagent Review (3 en paralelo) ←──┐
|
|
425
|
+
↓ │
|
|
426
|
+
¿Issues == 0? │
|
|
427
|
+
↓ │
|
|
428
|
+
NO → fix_review_issues ───────────┘
|
|
429
|
+
YES → verify_final
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
**REGLA:** El review loop se repite hasta 5 veces. Si después de 5 iteraciones aún hay issues, se bloquea completamente (interrupt_blocked). NO hay opción de "continuar con errores".
|
|
433
|
+
</agent_teams>
|
|
434
|
+
|
|
435
|
+
<blocking_review>
|
|
436
|
+
## Protocolo de Review Bloqueante
|
|
437
|
+
|
|
438
|
+
### Reglas Inquebrantables
|
|
439
|
+
|
|
440
|
+
1. **NUNCA** avanzar a post-mortem con issues de review pendientes
|
|
441
|
+
2. **NUNCA** ofrecer opción "continuar sin fix" o "aceptar con errores"
|
|
442
|
+
3. **SIEMPRE** re-ejecutar los 3 reviewers después de cada fix
|
|
443
|
+
4. **MÁXIMO** 5 iteraciones de fix → re-review
|
|
444
|
+
5. Si se agotan las 5 iteraciones → `interrupt_blocked` (solo retry, manual, o abort)
|
|
445
|
+
|
|
446
|
+
### Display de Iteraciones
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
╔══════════════════════════════════════════════════╗
|
|
450
|
+
║ CODE REVIEW - Iteración 3/5 ║
|
|
451
|
+
╠══════════════════════════════════════════════════╣
|
|
452
|
+
║ Issues encontrados: 2 ║
|
|
453
|
+
║ Issues corregidos: 5 (de iteraciones previas) ║
|
|
454
|
+
║ ║
|
|
455
|
+
║ Pendientes: ║
|
|
456
|
+
║ 1. Missing null check in auth.ts:42 ║
|
|
457
|
+
║ 2. Unused import in utils.ts:7 ║
|
|
458
|
+
║ ║
|
|
459
|
+
║ → Corrigiendo y re-ejecutando review... ║
|
|
460
|
+
╚══════════════════════════════════════════════════╝
|
|
461
|
+
```
|
|
462
|
+
</blocking_review>
|
|
463
|
+
|
|
341
464
|
<retry_protocol>
|
|
342
465
|
## Protocolo de Retry con Escape
|
|
343
466
|
|
|
@@ -431,7 +554,6 @@ Intento 3:
|
|
|
431
554
|
║ [e] Extender timeout (2x actual) ║
|
|
432
555
|
║ [d] Debug: investigar con /elsabro:debug ║
|
|
433
556
|
║ [m] Manual: ejecutar pasos uno a uno ║
|
|
434
|
-
║ [s] Skip: continuar sin esta tarea ║
|
|
435
557
|
║ [a] Abort: parar ejecución completa ║
|
|
436
558
|
╚══════════════════════════════════════════════════╝
|
|
437
559
|
```
|
package/bin/install.js
CHANGED
|
@@ -247,21 +247,20 @@ if (hasUpdate) {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
try {
|
|
250
|
-
// Use
|
|
251
|
-
//
|
|
252
|
-
|
|
250
|
+
// Use specific version from registry to avoid cache issues
|
|
251
|
+
// Don't pass --update to avoid infinite recursion
|
|
252
|
+
const versionToInstall = latestVersion || 'latest';
|
|
253
|
+
const packageSpec = `elsabro@${versionToInstall}`;
|
|
254
|
+
|
|
253
255
|
if (packageManager === 'pnpm') {
|
|
254
|
-
|
|
255
|
-
execFileSync(getExecutable('pnpm'), ['dlx', 'elsabro@latest', '--global'], { stdio: 'inherit' });
|
|
256
|
+
execFileSync(getExecutable('pnpm'), ['dlx', packageSpec, '--global'], { stdio: 'inherit' });
|
|
256
257
|
} else if (packageManager === 'bun') {
|
|
257
|
-
|
|
258
|
-
execFileSync(getExecutable('bunx'), ['elsabro@latest', '--global'], { stdio: 'inherit' });
|
|
258
|
+
execFileSync(getExecutable('bunx'), [packageSpec, '--global'], { stdio: 'inherit' });
|
|
259
259
|
} else {
|
|
260
|
-
// npm exec
|
|
261
|
-
|
|
262
|
-
execFileSync(getExecutable('npm'), ['exec', '--yes', '--', 'elsabro@latest', '--global'], { stdio: 'inherit' });
|
|
260
|
+
// npm exec with specific version bypasses cache
|
|
261
|
+
execFileSync(getExecutable('npm'), ['exec', '--yes', '--', packageSpec, '--global'], { stdio: 'inherit' });
|
|
263
262
|
}
|
|
264
|
-
console.log(`\n ${green}✓${reset} ELSABRO actualizado
|
|
263
|
+
console.log(`\n ${green}✓${reset} ELSABRO actualizado a v${versionToInstall}\n`);
|
|
265
264
|
} catch (error) {
|
|
266
265
|
console.error(`\n ${red}✗${reset} Error al actualizar: ${error.message}\n`);
|
|
267
266
|
process.exit(1);
|
|
@@ -13,6 +13,8 @@ allowed-tools:
|
|
|
13
13
|
- TaskUpdate
|
|
14
14
|
- TaskList
|
|
15
15
|
- TaskGet
|
|
16
|
+
- Teammate
|
|
17
|
+
- SendMessage
|
|
16
18
|
- AskUserQuestion
|
|
17
19
|
- mcp__plugin_context7_context7__*
|
|
18
20
|
argument-hint: "[número de fase]"
|
|
@@ -27,16 +29,24 @@ dispatcher:
|
|
|
27
29
|
model: haiku
|
|
28
30
|
parallel: true
|
|
29
31
|
min_agents: 3
|
|
32
|
+
method: "subagent"
|
|
30
33
|
implementation:
|
|
31
34
|
agents: [elsabro-executor, feature-dev:code-architect]
|
|
32
35
|
model: opus
|
|
33
36
|
parallel: true
|
|
34
37
|
min_agents: 2
|
|
38
|
+
method: "auto"
|
|
39
|
+
agent_team_config:
|
|
40
|
+
team_members: [elsabro-executor, elsabro-qa, elsabro-planner]
|
|
41
|
+
when: "complexity == 'high' || profile == 'teams'"
|
|
35
42
|
verification:
|
|
36
43
|
agents: [pr-review-toolkit:code-reviewer, pr-review-toolkit:silent-failure-hunter, pr-review-toolkit:pr-test-analyzer]
|
|
37
44
|
model: opus
|
|
38
45
|
parallel: true
|
|
39
46
|
min_agents: 3
|
|
47
|
+
method: "subagent"
|
|
48
|
+
blocking: true
|
|
49
|
+
max_review_iterations: 5
|
|
40
50
|
---
|
|
41
51
|
|
|
42
52
|
# ELSABRO: Execute
|
|
@@ -171,6 +181,156 @@ Ejecutar planes de una fase con:
|
|
|
171
181
|
- **OPUS para verificación:** Análisis profundo de bugs y edge cases
|
|
172
182
|
</dispatcher_integration>
|
|
173
183
|
|
|
184
|
+
<agent_teams_integration>
|
|
185
|
+
## Agent Teams Integration (v4.0.0)
|
|
186
|
+
|
|
187
|
+
### Cuándo Usar Agent Teams vs Subagents
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
191
|
+
│ AUTO-ROUTING DECISION │
|
|
192
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
193
|
+
│ CONDICIÓN │ MÉTODO │
|
|
194
|
+
├─────────────────────────────────────┼───────────────────────────────────┤
|
|
195
|
+
│ profile == "teams" │ AGENT TEAMS (siempre) │
|
|
196
|
+
│ complexity == "high" │ AGENT TEAMS (auto) │
|
|
197
|
+
│ complexity == "medium" + >3 waves │ AGENT TEAMS (auto) │
|
|
198
|
+
│ complexity == "low" │ SUBAGENTS (siempre) │
|
|
199
|
+
│ profile == "yolo" │ SUBAGENTS (siempre) │
|
|
200
|
+
│ Exploración │ SUBAGENTS (siempre - read-only) │
|
|
201
|
+
│ Verificación/Review │ SUBAGENTS (siempre - read-only) │
|
|
202
|
+
│ Implementación multi-wave │ AGENT TEAMS (auto) │
|
|
203
|
+
└─────────────────────────────────────┴───────────────────────────────────┘
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Flujo con Agent Teams
|
|
207
|
+
|
|
208
|
+
```javascript
|
|
209
|
+
// 1. Spawn team
|
|
210
|
+
Teammate({
|
|
211
|
+
operation: "spawnTeam",
|
|
212
|
+
team_name: "elsabro-impl",
|
|
213
|
+
description: "Implementation team for: " + task
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
// 2. Create tasks para el team
|
|
217
|
+
TaskCreate({ subject: "Analyze requirements", ... })
|
|
218
|
+
TaskCreate({ subject: "Implement core logic", ... })
|
|
219
|
+
TaskCreate({ subject: "Write tests", ... })
|
|
220
|
+
|
|
221
|
+
// 3. Spawn teammates
|
|
222
|
+
Task({
|
|
223
|
+
subagent_type: "elsabro-executor",
|
|
224
|
+
team_name: "elsabro-impl",
|
|
225
|
+
name: "executor-1",
|
|
226
|
+
prompt: "Implement core logic following TDD..."
|
|
227
|
+
})
|
|
228
|
+
Task({
|
|
229
|
+
subagent_type: "elsabro-qa",
|
|
230
|
+
team_name: "elsabro-impl",
|
|
231
|
+
name: "qa-1",
|
|
232
|
+
prompt: "Write comprehensive tests..."
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
// 4. Teammates coordinate via SendMessage
|
|
236
|
+
// 5. When done, cleanup
|
|
237
|
+
Teammate({ operation: "cleanup" })
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Agentes que Migran a Agent Teams
|
|
241
|
+
|
|
242
|
+
| Agente | Rol en Team | Cuándo |
|
|
243
|
+
|--------|-------------|--------|
|
|
244
|
+
| elsabro-orchestrator | Team Lead | Siempre (coordina) |
|
|
245
|
+
| elsabro-executor | Teammate | Implementación |
|
|
246
|
+
| elsabro-planner | Teammate | Planning |
|
|
247
|
+
| elsabro-analyst | Teammate | Análisis |
|
|
248
|
+
| elsabro-qa | Teammate | Testing |
|
|
249
|
+
| elsabro-verifier | Teammate | Verificación |
|
|
250
|
+
| elsabro-debugger | Teammate | Debug (iter >= 2) |
|
|
251
|
+
|
|
252
|
+
### Agentes que Permanecen como Subagents
|
|
253
|
+
|
|
254
|
+
| Agente | Razón |
|
|
255
|
+
|--------|-------|
|
|
256
|
+
| elsabro-quick-dev | Tarea simple, no necesita coordinación |
|
|
257
|
+
| elsabro-yolo-dev | Velocidad > coordinación |
|
|
258
|
+
| elsabro-scrum-master | Interacción con usuario |
|
|
259
|
+
| elsabro-tech-writer | Documentación independiente |
|
|
260
|
+
| elsabro-ux-designer | Diseño independiente |
|
|
261
|
+
</agent_teams_integration>
|
|
262
|
+
|
|
263
|
+
<blocking_review_protocol>
|
|
264
|
+
## Protocolo de Review Bloqueante (v4.0.0)
|
|
265
|
+
|
|
266
|
+
**REGLA CRÍTICA:** El proceso NO PUEDE avanzar a post-mortem si hay issues de code review sin resolver.
|
|
267
|
+
|
|
268
|
+
### Flujo
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
parallel_review (3 agentes)
|
|
272
|
+
↓
|
|
273
|
+
review_check: ¿hay issues?
|
|
274
|
+
↓
|
|
275
|
+
┌────┴────┐
|
|
276
|
+
│ NO │ YES
|
|
277
|
+
│ issues │ issues
|
|
278
|
+
↓ ↓
|
|
279
|
+
verify fix_review_issues
|
|
280
|
+
final (max 5 iteraciones)
|
|
281
|
+
↓
|
|
282
|
+
parallel_review (re-check)
|
|
283
|
+
↓
|
|
284
|
+
¿issues == 0?
|
|
285
|
+
↓
|
|
286
|
+
┌─────┴─────┐
|
|
287
|
+
│ SÍ │ NO (5 iter agotadas)
|
|
288
|
+
↓ ↓
|
|
289
|
+
verify_final interrupt_blocked
|
|
290
|
+
(SIN opción "continuar con errores")
|
|
291
|
+
↓
|
|
292
|
+
┌───┴───┐───────┐
|
|
293
|
+
│ │ │
|
|
294
|
+
retry manual abort
|
|
295
|
+
↓ ↓ ↓
|
|
296
|
+
fix_review wait end_cancelled
|
|
297
|
+
_issues _manual
|
|
298
|
+
_review_fix
|
|
299
|
+
↓
|
|
300
|
+
parallel_review (re-check)
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Escape Hatches ELIMINADOS
|
|
304
|
+
|
|
305
|
+
Los siguientes escape hatches han sido removidos en v4.0.0:
|
|
306
|
+
|
|
307
|
+
1. ~~`onMaxIterations: "verify_final"`~~ → Ahora va a `interrupt_blocked` (sin opción de continuar)
|
|
308
|
+
2. ~~`"skip": "Continuar sin fix"`~~ → Removido de `interrupt_manual_fix`
|
|
309
|
+
3. ~~`"accept": "Aceptar con errores"`~~ → Removido de `interrupt_verification_failed`
|
|
310
|
+
|
|
311
|
+
### Iteraciones de Review
|
|
312
|
+
|
|
313
|
+
```javascript
|
|
314
|
+
// Estado del review loop
|
|
315
|
+
state.reviewIteration = state.reviewIteration || 0;
|
|
316
|
+
state.reviewIteration++;
|
|
317
|
+
|
|
318
|
+
// Log de cada iteración
|
|
319
|
+
console.log(`[REVIEW] Iteración ${state.reviewIteration}/5`);
|
|
320
|
+
console.log(`[REVIEW] Issues encontrados: ${issueCount}`);
|
|
321
|
+
|
|
322
|
+
// Solo avanza cuando issues == 0
|
|
323
|
+
if (issueCount === 0) {
|
|
324
|
+
state.reviewIteration = 0; // Reset
|
|
325
|
+
// → verify_final
|
|
326
|
+
} else if (state.reviewIteration >= 5) {
|
|
327
|
+
// → interrupt_blocked (NO verify_final)
|
|
328
|
+
} else {
|
|
329
|
+
// → fix_review_issues → parallel_review
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
</blocking_review_protocol>
|
|
333
|
+
|
|
174
334
|
<process>
|
|
175
335
|
## Paso 0: Exploración Pre-Ejecución (HAIKU x3 paralelo)
|
|
176
336
|
|
|
@@ -744,7 +904,7 @@ if (summary.decision === "STOP") {
|
|
|
744
904
|
│ ↓ │
|
|
745
905
|
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
746
906
|
│ │ CRITICAL: Notificar inmediatamente, STOP │ │
|
|
747
|
-
│ │ HIGH: Notificar, ofrecer opciones [fix/
|
|
907
|
+
│ │ HIGH: Notificar, ofrecer opciones [fix/debug/abort] │ │
|
|
748
908
|
│ │ MEDIUM: Agregar a resumen, continuar │ │
|
|
749
909
|
│ │ LOW: Log para debugging, continuar │ │
|
|
750
910
|
│ └─────────────────────────────────────────────────────────────┘ │
|
|
@@ -815,7 +975,7 @@ await sessionValidator.save(state);
|
|
|
815
975
|
| Severity | Emoji | Accion |
|
|
816
976
|
|----------|-------|--------|
|
|
817
977
|
| CRITICAL | Parar | No puede continuar de ninguna forma |
|
|
818
|
-
| HIGH | Preguntar | Ofrecer opciones: fix/
|
|
978
|
+
| HIGH | Preguntar | Ofrecer opciones: fix/debug/abort |
|
|
819
979
|
| MEDIUM | Warning | Mostrar y continuar |
|
|
820
980
|
| LOW | Info | Log y continuar |
|
|
821
981
|
|
|
@@ -827,8 +987,8 @@ await sessionValidator.save(state);
|
|
|
827
987
|
| Falta validacion critica | HIGH | Auto-add |
|
|
828
988
|
| Falta dependencia | HIGH | Auto-install |
|
|
829
989
|
| Cambio arquitectonico | HIGH | CHECKPOINT |
|
|
830
|
-
| Tests fallan | HIGH |
|
|
831
|
-
| Lint warnings |
|
|
990
|
+
| Tests fallan | HIGH | Auto-fix (5 intentos) |
|
|
991
|
+
| Lint warnings | HIGH | Auto-fix (incluido en quality gate) |
|
|
832
992
|
|
|
833
993
|
### Actualizar Estado con Tasks
|
|
834
994
|
|