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,45 +1,182 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-work
|
|
3
|
-
description: Verificación completa del trabajo realizado usando agentes paralelos
|
|
3
|
+
description: Verificación completa del trabajo realizado usando agentes paralelos con Tasks
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
|
+
- Write
|
|
6
7
|
- Bash
|
|
7
8
|
- Glob
|
|
8
9
|
- Grep
|
|
9
10
|
- Task
|
|
11
|
+
- TaskCreate
|
|
12
|
+
- TaskUpdate
|
|
13
|
+
- TaskList
|
|
14
|
+
- TaskGet
|
|
15
|
+
- AskUserQuestion
|
|
16
|
+
sync:
|
|
17
|
+
reads: [".elsabro/state.json"]
|
|
18
|
+
writes: [".elsabro/state.json", ".elsabro/context.md", ".planning/VERIFICATION-REPORT.md"]
|
|
19
|
+
phases: ["initializing", "verifying", "aggregating", "done"]
|
|
20
|
+
passes_context_to: ["execute (si gaps)", "done"]
|
|
21
|
+
dispatcher:
|
|
22
|
+
verification:
|
|
23
|
+
agents: [pr-review-toolkit:code-reviewer, pr-review-toolkit:silent-failure-hunter, pr-review-toolkit:pr-test-analyzer]
|
|
24
|
+
model: opus
|
|
25
|
+
parallel: true
|
|
26
|
+
min_agents: 3
|
|
10
27
|
---
|
|
11
28
|
|
|
12
29
|
# /elsabro:verify-work
|
|
13
30
|
|
|
14
31
|
<command-name>verify-work</command-name>
|
|
15
32
|
|
|
33
|
+
<state_sync>
|
|
34
|
+
## SINCRONIZACIÓN DE ESTADO (OBLIGATORIO)
|
|
35
|
+
|
|
36
|
+
**IMPORTAR**: Este comando DEBE seguir `/references/state-sync.md` y `/references/enforcement-rules.md`.
|
|
37
|
+
|
|
38
|
+
### Al Iniciar (ANTES de cualquier operación)
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
// 1. Crear task de inicialización
|
|
42
|
+
TaskCreate({
|
|
43
|
+
subject: "Initialize verify-work command",
|
|
44
|
+
description: "Leer estado y preparar verificación",
|
|
45
|
+
activeForm: "Inicializando..."
|
|
46
|
+
})
|
|
47
|
+
TaskUpdate(id, status: "in_progress")
|
|
48
|
+
|
|
49
|
+
// 2. Leer estado existente
|
|
50
|
+
const state = Read(".elsabro/state.json") || createInitialState();
|
|
51
|
+
|
|
52
|
+
// 3. Verificar contexto de execute (archivos a verificar)
|
|
53
|
+
if (state.context.changed_files && state.context.changed_files.length > 0) {
|
|
54
|
+
console.log("Archivos a verificar:", state.context.changed_files);
|
|
55
|
+
console.log("Commits a revisar:", state.context.commits);
|
|
56
|
+
} else {
|
|
57
|
+
// No hay contexto de execute - verificar todo
|
|
58
|
+
console.log("Sin contexto de execute - verificación completa");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 4. Actualizar estado
|
|
62
|
+
state.current_flow = { command: "verify-work", phase: "initializing", started_at: new Date().toISOString() };
|
|
63
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
64
|
+
|
|
65
|
+
// 5. Completar task de inicialización
|
|
66
|
+
TaskUpdate(id, status: "completed")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Al Cambiar de Fase
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
// Antes de verificación
|
|
73
|
+
state.current_flow.phase = "verifying";
|
|
74
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
75
|
+
|
|
76
|
+
// Antes de agregación
|
|
77
|
+
state.current_flow.phase = "aggregating";
|
|
78
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Al Completar
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
// Registrar en historial
|
|
85
|
+
state.history.push({
|
|
86
|
+
command: "verify-work",
|
|
87
|
+
completed_at: new Date().toISOString(),
|
|
88
|
+
result: verificationResult, // "PASS" | "FAIL" | "PARTIAL"
|
|
89
|
+
artifact: ".planning/VERIFICATION-REPORT.md"
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Actualizar contexto
|
|
93
|
+
state.context.verification_result = verificationResult;
|
|
94
|
+
state.context.ready_for_merge = verificationResult === "PASS";
|
|
95
|
+
|
|
96
|
+
// Limpiar flujo y sugerir siguiente
|
|
97
|
+
state.current_flow = null;
|
|
98
|
+
state.suggested_next = verificationResult === "PASS" ? null : "execute"; // null = done
|
|
99
|
+
|
|
100
|
+
Write(".elsabro/state.json", JSON.stringify(state, null, 2));
|
|
101
|
+
|
|
102
|
+
// Actualizar context.md legible
|
|
103
|
+
Write(".elsabro/context.md", generateHumanReadableContext(state));
|
|
104
|
+
```
|
|
105
|
+
</state_sync>
|
|
106
|
+
|
|
16
107
|
## Propósito
|
|
17
108
|
|
|
18
109
|
Verificar que el trabajo completado cumple con los requirements, pasa todos los tests, y está listo para merge/deploy.
|
|
19
110
|
|
|
111
|
+
## Sistema de Tasks para Verificación
|
|
112
|
+
|
|
113
|
+
### Crear estructura de verificación con dependencias
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
// 1. Crear tasks de verificación paralela
|
|
117
|
+
TaskCreate({
|
|
118
|
+
subject: "Verify Functional Requirements",
|
|
119
|
+
description: "Check acceptance criteria and feature behavior",
|
|
120
|
+
activeForm: "Verificando funcionalidad...",
|
|
121
|
+
metadata: { type: "verifier", area: "functional", timeout: 30 }
|
|
122
|
+
}) // → functional-id
|
|
123
|
+
|
|
124
|
+
TaskCreate({
|
|
125
|
+
subject: "Verify Quality Metrics",
|
|
126
|
+
description: "Run tests, check coverage, lint",
|
|
127
|
+
activeForm: "Verificando calidad...",
|
|
128
|
+
metadata: { type: "verifier", area: "quality", timeout: 45 }
|
|
129
|
+
}) // → quality-id
|
|
130
|
+
|
|
131
|
+
TaskCreate({
|
|
132
|
+
subject: "Verify Security & Edge Cases",
|
|
133
|
+
description: "Check vulnerabilities, error handling",
|
|
134
|
+
activeForm: "Verificando seguridad...",
|
|
135
|
+
metadata: { type: "verifier", area: "security", timeout: 25 }
|
|
136
|
+
}) // → security-id
|
|
137
|
+
|
|
138
|
+
// 2. Crear agregador que espera a todos
|
|
139
|
+
TaskCreate({
|
|
140
|
+
subject: "Aggregate Verification Results",
|
|
141
|
+
description: "Combine results and generate final report",
|
|
142
|
+
activeForm: "Agregando resultados...",
|
|
143
|
+
metadata: { type: "aggregator", policy: "fail_fast" }
|
|
144
|
+
}) // → aggregate-id
|
|
145
|
+
|
|
146
|
+
// 3. Configurar dependencias (agregador espera a todos)
|
|
147
|
+
TaskUpdate({
|
|
148
|
+
taskId: "aggregate-id",
|
|
149
|
+
addBlockedBy: ["functional-id", "quality-id", "security-id"]
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
20
153
|
## Protocolo de Verificación
|
|
21
154
|
|
|
22
155
|
Usa **mínimo 3 agentes en paralelo** para verificación exhaustiva:
|
|
23
156
|
|
|
24
157
|
```
|
|
25
158
|
┌──────────────────────────────────────────────────────┐
|
|
26
|
-
│ VERIFICACIÓN PARALELA
|
|
159
|
+
│ VERIFICACIÓN PARALELA CON TASKS │
|
|
27
160
|
├──────────────────────────────────────────────────────┤
|
|
28
161
|
│ │
|
|
29
|
-
│
|
|
162
|
+
│ Task: Functional Verification (verify-functional) │
|
|
30
163
|
│ └─ ¿El código hace lo que debe? │
|
|
31
164
|
│ └─ ¿Cumple acceptance criteria? │
|
|
32
165
|
│ │
|
|
33
|
-
│
|
|
166
|
+
│ Task: Quality Verification (verify-quality) │
|
|
34
167
|
│ └─ ¿Tests pasan? │
|
|
35
168
|
│ └─ ¿Coverage adecuado? │
|
|
36
169
|
│ └─ ¿Sin errores de lint? │
|
|
37
170
|
│ │
|
|
38
|
-
│
|
|
171
|
+
│ Task: Security/Edge Cases (verify-security) │
|
|
39
172
|
│ └─ ¿Sin vulnerabilidades obvias? │
|
|
40
173
|
│ └─ ¿Edge cases manejados? │
|
|
41
174
|
│ └─ ¿Error handling correcto? │
|
|
42
175
|
│ │
|
|
176
|
+
│ Task: Aggregator (blockedBy: [all above]) │
|
|
177
|
+
│ └─ Se desbloquea cuando TODOS completen │
|
|
178
|
+
│ └─ Genera VERIFICATION-REPORT.md │
|
|
179
|
+
│ │
|
|
43
180
|
└──────────────────────────────────────────────────────┘
|
|
44
181
|
```
|
|
45
182
|
|
|
@@ -146,22 +283,77 @@ Para verificación, usamos `policy: fail_fast` porque todos los checks son crít
|
|
|
146
283
|
└────────────────────────────────────────────────┘
|
|
147
284
|
```
|
|
148
285
|
|
|
149
|
-
### Lanzamiento de Agentes
|
|
286
|
+
### Lanzamiento de Agentes OPUS x3 con Tasks
|
|
287
|
+
|
|
288
|
+
**OBLIGATORIO:** Usar 3 agentes OPUS especializados para verificación profunda.
|
|
289
|
+
|
|
290
|
+
```javascript
|
|
291
|
+
// 1. Marcar todos como in_progress
|
|
292
|
+
TaskUpdate({ taskId: "functional-id", status: "in_progress" })
|
|
293
|
+
TaskUpdate({ taskId: "quality-id", status: "in_progress" })
|
|
294
|
+
TaskUpdate({ taskId: "security-id", status: "in_progress" })
|
|
295
|
+
|
|
296
|
+
// 2. Lanzar 3 agentes OPUS EN UN SOLO MENSAJE (paralelo real)
|
|
297
|
+
Task({
|
|
298
|
+
subagent_type: "pr-review-toolkit:code-reviewer",
|
|
299
|
+
model: "opus", // ← OPUS para análisis profundo
|
|
300
|
+
description: "Code review completo",
|
|
301
|
+
prompt: "Revisa los cambios buscando bugs, code smells, mejores prácticas, seguridad..."
|
|
302
|
+
}) |
|
|
303
|
+
Task({
|
|
304
|
+
subagent_type: "pr-review-toolkit:silent-failure-hunter",
|
|
305
|
+
model: "opus", // ← OPUS para edge cases
|
|
306
|
+
description: "Buscar errores ocultos",
|
|
307
|
+
prompt: "Busca errores silenciosos, try/catch que ocultan errores, fallbacks problemáticos..."
|
|
308
|
+
}) |
|
|
309
|
+
Task({
|
|
310
|
+
subagent_type: "pr-review-toolkit:pr-test-analyzer",
|
|
311
|
+
model: "opus", // ← OPUS para análisis de tests
|
|
312
|
+
description: "Analizar cobertura de tests",
|
|
313
|
+
prompt: "Verifica que los tests cubren los cambios, busca casos críticos sin test..."
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
// 3. Al completar cada uno, marcar completed
|
|
317
|
+
TaskUpdate({
|
|
318
|
+
taskId: "functional-id",
|
|
319
|
+
status: "completed",
|
|
320
|
+
metadata: { result: "PASS", duration: "18s" }
|
|
321
|
+
})
|
|
322
|
+
// ... repeat for others ...
|
|
323
|
+
|
|
324
|
+
// 4. Cuando TODOS completen, aggregator se desbloquea automáticamente
|
|
325
|
+
TaskUpdate({ taskId: "aggregate-id", status: "in_progress" })
|
|
326
|
+
// ... generate VERIFICATION-REPORT.md ...
|
|
327
|
+
TaskUpdate({ taskId: "aggregate-id", status: "completed" })
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Visualización con Ctrl+T
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
📋 Verification Tasks:
|
|
334
|
+
✅ Functional Verification - PASS (18s)
|
|
335
|
+
✅ Quality Verification - PASS (25s)
|
|
336
|
+
🔧 Security Verification - Running...
|
|
337
|
+
⏳ Aggregate Results - Blocked (waiting for security)
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Diagrama de Dependencias
|
|
150
341
|
|
|
151
342
|
```
|
|
152
|
-
# Los 3 agentes corren en paralelo
|
|
343
|
+
# Los 3 agentes corren en paralelo, agregador espera
|
|
153
344
|
┌─────────────────────────────────────────────────┐
|
|
154
345
|
│ │
|
|
155
346
|
│ ┌─────────────┐ ┌─────────────┐ ┌─────────┐ │
|
|
156
347
|
│ │ Functional │ │ Quality │ │Security │ │
|
|
157
|
-
│ │
|
|
348
|
+
│ │ (Task) │ │ (Task) │ │(Task) │ │
|
|
158
349
|
│ └──────┬──────┘ └──────┬──────┘ └────┬────┘ │
|
|
159
350
|
│ │ │ │ │
|
|
160
|
-
│
|
|
351
|
+
│ └───── blockedBy ┼──────────────┘ │
|
|
161
352
|
│ │ │
|
|
162
353
|
│ ┌──────▼──────┐ │
|
|
163
354
|
│ │ Aggregator │ │
|
|
164
|
-
│ │ (
|
|
355
|
+
│ │ (Task) │ │
|
|
356
|
+
│ │ auto-unlock │ │
|
|
165
357
|
│ └─────────────┘ │
|
|
166
358
|
│ │
|
|
167
359
|
└─────────────────────────────────────────────────┘
|
|
@@ -238,9 +430,70 @@ Si un agente falla por razones transitorias (timeout, network):
|
|
|
238
430
|
└──────────────────────────────────────────────────┘
|
|
239
431
|
```
|
|
240
432
|
|
|
241
|
-
### Actualizar Estado
|
|
433
|
+
### Actualizar Estado con Tasks
|
|
434
|
+
|
|
435
|
+
Al completar verificación, actualizar tanto Tasks como SESSION-STATE.json:
|
|
436
|
+
|
|
437
|
+
```javascript
|
|
438
|
+
// 1. Verificar estado final con TaskList
|
|
439
|
+
TaskList()
|
|
440
|
+
// Output:
|
|
441
|
+
// ✅ functional-verifier: completed
|
|
442
|
+
// ✅ quality-verifier: completed
|
|
443
|
+
// ✅ security-verifier: completed
|
|
444
|
+
// ✅ aggregate-results: completed
|
|
445
|
+
|
|
446
|
+
// 2. Obtener detalles de cualquier task
|
|
447
|
+
TaskGet({ taskId: "quality-id" })
|
|
448
|
+
// Output:
|
|
449
|
+
// status: "completed"
|
|
450
|
+
// metadata: { result: "PASS", tests: "45/45", coverage: "87%" }
|
|
451
|
+
|
|
452
|
+
// 3. Si alguna falló, TaskGet muestra detalles
|
|
453
|
+
TaskGet({ taskId: "security-id" })
|
|
454
|
+
// Output:
|
|
455
|
+
// status: "completed"
|
|
456
|
+
// metadata: { result: "FAIL", vulnerabilities: ["SQL injection in /api/users"] }
|
|
457
|
+
```
|
|
242
458
|
|
|
243
|
-
|
|
459
|
+
### Manejo de Fallo con Tasks
|
|
460
|
+
|
|
461
|
+
```javascript
|
|
462
|
+
// Si quality-verifier falla:
|
|
463
|
+
TaskUpdate({
|
|
464
|
+
taskId: "quality-id",
|
|
465
|
+
status: "completed", // Completó pero con error
|
|
466
|
+
metadata: {
|
|
467
|
+
result: "FAIL",
|
|
468
|
+
failedTests: 3,
|
|
469
|
+
details: ["Profile.test.ts: Expected John got null"]
|
|
470
|
+
}
|
|
471
|
+
})
|
|
472
|
+
|
|
473
|
+
// El agregador se activa pero reporta el fallo
|
|
474
|
+
TaskUpdate({ taskId: "aggregate-id", status: "in_progress" })
|
|
475
|
+
// Genera VERIFICATION-REPORT.md con detalles del fallo
|
|
476
|
+
TaskUpdate({
|
|
477
|
+
taskId: "aggregate-id",
|
|
478
|
+
status: "completed",
|
|
479
|
+
metadata: {
|
|
480
|
+
overallResult: "FAIL",
|
|
481
|
+
passedChecks: 2,
|
|
482
|
+
failedChecks: 1,
|
|
483
|
+
readyForReview: false
|
|
484
|
+
}
|
|
485
|
+
})
|
|
486
|
+
|
|
487
|
+
// Crear subtask de fix si es necesario
|
|
488
|
+
TaskCreate({
|
|
489
|
+
subject: "Fix: Quality verification failed",
|
|
490
|
+
description: "3 tests failing, needs attention",
|
|
491
|
+
activeForm: "Fixing test failures...",
|
|
492
|
+
metadata: { type: "bugfix", parentTask: "quality-id" }
|
|
493
|
+
})
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### JSON State (compatibilidad)
|
|
244
497
|
|
|
245
498
|
```json
|
|
246
499
|
{
|
|
@@ -263,6 +516,12 @@ Al completar verificación:
|
|
|
263
516
|
"lastRun": "2024-01-20T16:30:00Z",
|
|
264
517
|
"result": "PASS",
|
|
265
518
|
"readyForReview": true
|
|
519
|
+
},
|
|
520
|
+
"tasks": {
|
|
521
|
+
"functional-id": "completed",
|
|
522
|
+
"quality-id": "completed",
|
|
523
|
+
"security-id": "completed",
|
|
524
|
+
"aggregate-id": "completed"
|
|
266
525
|
}
|
|
267
526
|
}
|
|
268
527
|
```
|
package/package.json
CHANGED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# ELSABRO System Index
|
|
2
|
+
|
|
3
|
+
## ARQUITECTURA DEL SISTEMA
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
7
|
+
│ ELSABRO SYSTEM │
|
|
8
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
9
|
+
│ │
|
|
10
|
+
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
11
|
+
│ │ ENTRY POINT │ │
|
|
12
|
+
│ │ /elsabro:start │ │
|
|
13
|
+
│ │ (Orquestador Principal) │ │
|
|
14
|
+
│ └────────────────────────────┬─────────────────────────────────────────┘ │
|
|
15
|
+
│ │ │
|
|
16
|
+
│ ▼ │
|
|
17
|
+
│ ┌────────────────────────────────────────────────────────────────────────┐ │
|
|
18
|
+
│ │ CORE WORKFLOW │ │
|
|
19
|
+
│ │ ┌─────────┐ ┌─────────┐ ┌─────────────┐ ┌───────────────┐ │ │
|
|
20
|
+
│ │ │ :new │→ │ :plan │→ │ :execute │→ │ :verify-work │ │ │
|
|
21
|
+
│ │ │ (setup) │ │(design) │ │(implement) │ │ (check) │ │ │
|
|
22
|
+
│ │ └─────────┘ └─────────┘ └─────────────┘ └───────────────┘ │ │
|
|
23
|
+
│ │ ↑ │ │ │
|
|
24
|
+
│ │ └───── :debug ──┘ │ │
|
|
25
|
+
│ └────────────────────────────────────────────────────────────────────────┘ │
|
|
26
|
+
│ │
|
|
27
|
+
│ ┌────────────────────────────────────────────────────────────────────────┐ │
|
|
28
|
+
│ │ SHARED STATE │ │
|
|
29
|
+
│ │ .elsabro/state.json │ │
|
|
30
|
+
│ │ (Sincronización entre comandos) │ │
|
|
31
|
+
│ └────────────────────────────────────────────────────────────────────────┘ │
|
|
32
|
+
│ │
|
|
33
|
+
│ ┌────────────────────────────────────────────────────────────────────────┐ │
|
|
34
|
+
│ │ TASK DISPATCHER │ │
|
|
35
|
+
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
|
|
36
|
+
│ │ │ HAIKU │ │ SONNET │ │ OPUS │ │ │
|
|
37
|
+
│ │ │ Exploración │ │ Balance │ │ Implementar │ │ │
|
|
38
|
+
│ │ │ (rápido) │ │ (flexible) │ │ (calidad) │ │ │
|
|
39
|
+
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
|
|
40
|
+
│ └────────────────────────────────────────────────────────────────────────┘ │
|
|
41
|
+
│ │
|
|
42
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## ARCHIVOS DE REFERENCIA
|
|
48
|
+
|
|
49
|
+
### 1. `enforcement-rules.md`
|
|
50
|
+
**Propósito**: Reglas NO negociables que todo comando debe seguir
|
|
51
|
+
**Contiene**:
|
|
52
|
+
- Secuencia obligatoria: TaskCreate → TaskUpdate → Task → TaskUpdate
|
|
53
|
+
- Mínimos de agentes por fase
|
|
54
|
+
- Matriz completa de todos los comandos (29 comandos)
|
|
55
|
+
- Políticas de paralelismo
|
|
56
|
+
|
|
57
|
+
### 2. `state-sync.md`
|
|
58
|
+
**Propósito**: Protocolo de sincronización de estado entre comandos
|
|
59
|
+
**Contiene**:
|
|
60
|
+
- Código de sincronización para copiar a cada comando
|
|
61
|
+
- Fases por comando
|
|
62
|
+
- Contexto que pasa cada comando al siguiente
|
|
63
|
+
- Transiciones válidas entre comandos
|
|
64
|
+
|
|
65
|
+
### 3. `command-flow.md`
|
|
66
|
+
**Propósito**: Flujo de navegación y estado compartido
|
|
67
|
+
**Contiene**:
|
|
68
|
+
- Diagrama de flujo principal
|
|
69
|
+
- Estructura de `.elsabro/state.json`
|
|
70
|
+
- Checkpoints entre comandos
|
|
71
|
+
- Recuperación de contexto
|
|
72
|
+
|
|
73
|
+
### 4. `task-dispatcher.md`
|
|
74
|
+
**Propósito**: Selección automática de modelo según tipo de tarea
|
|
75
|
+
**Contiene**:
|
|
76
|
+
- Matriz modelo-tipo de tarea
|
|
77
|
+
- Configuración de agentes por comando
|
|
78
|
+
- Políticas de ejecución paralela
|
|
79
|
+
- Integración con Claude Code Tasks API
|
|
80
|
+
|
|
81
|
+
### 4.1. `tasks-integration.md` (NUEVO)
|
|
82
|
+
**Propósito**: Integración con Claude Code Tasks API como backend único
|
|
83
|
+
**Contiene**:
|
|
84
|
+
- Arquitectura unificada (ELSABRO commands + Tasks API)
|
|
85
|
+
- Metadata schema para TODOs, phases, milestones
|
|
86
|
+
- Migración de `.planning/TODOS.md` a Tasks API
|
|
87
|
+
- Ejemplos de implementación para cada comando
|
|
88
|
+
|
|
89
|
+
### 5. `error-handling-instructions.md`
|
|
90
|
+
**Propósito**: Manejo consistente de errores
|
|
91
|
+
**Contiene**:
|
|
92
|
+
- Clasificación (CRITICAL, HIGH, MEDIUM, LOW)
|
|
93
|
+
- Display visual de errores
|
|
94
|
+
- Políticas de retry
|
|
95
|
+
- Actualización de estado después de errores
|
|
96
|
+
|
|
97
|
+
### 6. `source-hierarchy.md`
|
|
98
|
+
**Propósito**: Prioridad de fuentes de información
|
|
99
|
+
**Contiene**:
|
|
100
|
+
- Context7 > Docs > WebSearch > Training
|
|
101
|
+
- Verificación de versiones
|
|
102
|
+
- Proceso de research
|
|
103
|
+
|
|
104
|
+
### 7. `token-optimization.md`
|
|
105
|
+
**Propósito**: Uso eficiente del contexto
|
|
106
|
+
**Contiene**:
|
|
107
|
+
- Regla del 50%
|
|
108
|
+
- Lazy loading
|
|
109
|
+
- Wave execution
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## ESTADO UNIFICADO
|
|
114
|
+
|
|
115
|
+
**Archivo principal**: `.elsabro/state.json`
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"version": "1.0.0",
|
|
120
|
+
"created_at": "ISO timestamp",
|
|
121
|
+
"updated_at": "ISO timestamp",
|
|
122
|
+
|
|
123
|
+
"current_flow": {
|
|
124
|
+
"command": "string",
|
|
125
|
+
"phase": "string",
|
|
126
|
+
"started_at": "ISO timestamp"
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
"context": {
|
|
130
|
+
"project_type": "greenfield | brownfield | continuation",
|
|
131
|
+
"tech_stack": ["array"],
|
|
132
|
+
"current_feature": "string | null"
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
"history": [
|
|
136
|
+
{
|
|
137
|
+
"command": "string",
|
|
138
|
+
"completed_at": "ISO timestamp",
|
|
139
|
+
"result": "string",
|
|
140
|
+
"artifact": "path | null"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
|
|
144
|
+
"pending_tasks": [],
|
|
145
|
+
"blocked_on": null,
|
|
146
|
+
"suggested_next": "string | null",
|
|
147
|
+
|
|
148
|
+
"errors": {
|
|
149
|
+
"count": 0,
|
|
150
|
+
"lastError": null
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Archivo legible**: `.elsabro/context.md` (para humanos)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## SKILLS PROFESIONALES
|
|
160
|
+
|
|
161
|
+
| Skill | Stack | Versiones |
|
|
162
|
+
|-------|-------|-----------|
|
|
163
|
+
| `full-stack-app` | Next.js 15 + React 19 + Prisma 6 + PostgreSQL | Específicas |
|
|
164
|
+
| `saas-starter` | Full-stack + Stripe 2024-12-18 | Específicas |
|
|
165
|
+
| `mobile-app` | Expo SDK 52 + React Native | Específicas |
|
|
166
|
+
| `api-microservice` | Fastify + OpenAPI + Docker | Parciales |
|
|
167
|
+
| `chrome-extension` | Manifest V3 + Vite + TypeScript | Parciales |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## CHECKLIST DE CONSISTENCIA
|
|
172
|
+
|
|
173
|
+
Para verificar que el sistema está correctamente configurado:
|
|
174
|
+
|
|
175
|
+
### Comandos Core
|
|
176
|
+
- [ ] `start.md` tiene sección `<enforcement>` y `<state_sync>`
|
|
177
|
+
- [ ] `plan.md` tiene sección `<state_sync>` y `dispatcher` en frontmatter
|
|
178
|
+
- [ ] `execute.md` tiene sección `<state_sync>` y `dispatcher` en frontmatter
|
|
179
|
+
- [ ] `verify-work.md` tiene sección `<state_sync>` y `dispatcher` en frontmatter
|
|
180
|
+
|
|
181
|
+
### Referencias
|
|
182
|
+
- [ ] Todos los archivos usan `.elsabro/state.json` (NO `.planning/SESSION.md`)
|
|
183
|
+
- [ ] `enforcement-rules.md` tiene matriz para los 29 comandos
|
|
184
|
+
- [ ] `state-sync.md` tiene código de sincronización completo
|
|
185
|
+
|
|
186
|
+
### Skills
|
|
187
|
+
- [ ] Cada skill tiene `tags` en frontmatter
|
|
188
|
+
- [ ] Cada skill tiene versiones específicas de tecnologías
|
|
189
|
+
- [ ] Cada skill tiene `<verification>` ejecutable
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## FLUJO DE EJECUCIÓN TÍPICO
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
1. Usuario ejecuta /elsabro:start
|
|
197
|
+
└─ Lee .elsabro/state.json (si existe)
|
|
198
|
+
└─ Lanza 2 HAIKU en paralelo para detectar contexto
|
|
199
|
+
└─ Muestra opciones según proyecto (greenfield/brownfield/continuation)
|
|
200
|
+
└─ Actualiza state.json con current_flow
|
|
201
|
+
└─ Invoca siguiente comando con Skill tool
|
|
202
|
+
|
|
203
|
+
2. /elsabro:plan toma control
|
|
204
|
+
└─ Lee state.json (contexto de start)
|
|
205
|
+
└─ Lanza 3 HAIKU en paralelo para explorar
|
|
206
|
+
└─ Lanza 1 OPUS para crear RESEARCH.md y PLAN.md
|
|
207
|
+
└─ Lanza 1 SONNET para validar plan
|
|
208
|
+
└─ Actualiza state.json (plan_file, ready_for_execution)
|
|
209
|
+
└─ Sugiere /elsabro:execute
|
|
210
|
+
|
|
211
|
+
3. /elsabro:execute toma control
|
|
212
|
+
└─ Lee state.json (plan_file)
|
|
213
|
+
└─ Lanza 3 HAIKU en paralelo para explorar
|
|
214
|
+
└─ Lanza 2+ OPUS en paralelo para implementar (por wave)
|
|
215
|
+
└─ Lanza 3 OPUS en paralelo para verificar
|
|
216
|
+
└─ Actualiza state.json (changed_files, commits)
|
|
217
|
+
└─ Sugiere /elsabro:verify-work
|
|
218
|
+
|
|
219
|
+
4. /elsabro:verify-work finaliza
|
|
220
|
+
└─ Lee state.json (changed_files)
|
|
221
|
+
└─ Lanza 3 OPUS en paralelo para verificación exhaustiva
|
|
222
|
+
└─ Genera VERIFICATION-REPORT.md
|
|
223
|
+
└─ Actualiza state.json (verification_result)
|
|
224
|
+
└─ Si PASS: "Listo para merge"
|
|
225
|
+
└─ Si FAIL: Sugiere /elsabro:execute para fix
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## REGLAS DE ORO
|
|
231
|
+
|
|
232
|
+
1. **TaskCreate ANTES de cualquier acción**
|
|
233
|
+
2. **TaskUpdate(in_progress) ANTES de Task()**
|
|
234
|
+
3. **Tasks API como backend único** (NO duplicar con sistemas custom)
|
|
235
|
+
4. **Metadata schema consistente** para type, priority, category
|
|
236
|
+
5. **TaskList para sincronización** (NO archivos .md separados)
|
|
237
|
+
6. **Mínimo 3 agentes HAIKU para exploración**
|
|
238
|
+
7. **OPUS para implementación y verificación**
|
|
239
|
+
8. **Context7 ANTES de escribir código con librerías**
|
|
240
|
+
9. **Paralelismo OBLIGATORIO cuando las tareas son independientes**
|
|
241
|
+
10. **Pasar contexto via Task metadata** al siguiente comando
|