elsabro 2.2.0 → 3.7.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/README.md +668 -20
- package/agents/elsabro-orchestrator.md +113 -0
- package/bin/install.js +0 -0
- package/commands/elsabro/execute.md +223 -46
- package/commands/elsabro/start.md +34 -0
- package/commands/elsabro/verify-work.md +29 -0
- package/flows/development-flow.json +452 -0
- package/flows/quick-flow.json +118 -0
- package/hooks/confirm-destructive.sh +145 -0
- package/hooks/hooks-config.json +81 -0
- package/hooks/lint-check.sh +238 -0
- package/hooks/post-edit-test.sh +189 -0
- package/package.json +5 -3
- package/references/SYSTEM_INDEX.md +379 -5
- package/references/agent-marketplace.md +2274 -0
- package/references/agent-protocol.md +1126 -0
- package/references/ai-code-suggestions.md +2413 -0
- package/references/checkpointing.md +595 -0
- package/references/collaboration-patterns.md +851 -0
- package/references/collaborative-sessions.md +1081 -0
- package/references/configuration-management.md +1810 -0
- package/references/cost-tracking.md +1095 -0
- package/references/enterprise-sso.md +2001 -0
- package/references/error-contracts-tests.md +1171 -0
- package/references/error-contracts-v2.md +968 -0
- package/references/error-contracts.md +3102 -0
- package/references/event-driven.md +1031 -0
- package/references/flow-orchestration.md +940 -0
- package/references/flow-visualization.md +1557 -0
- package/references/ide-integrations.md +3513 -0
- package/references/interrupt-system.md +681 -0
- package/references/kubernetes-deployment.md +3099 -0
- package/references/memory-system.md +683 -0
- package/references/mobile-companion.md +3236 -0
- package/references/multi-llm-providers.md +2494 -0
- package/references/multi-project-memory.md +1182 -0
- package/references/observability.md +793 -0
- package/references/output-schemas.md +858 -0
- package/references/parallel-worktrees.md +293 -0
- package/references/performance-profiler.md +955 -0
- package/references/plugin-system.md +1526 -0
- package/references/prompt-management.md +292 -0
- package/references/sandbox-execution.md +303 -0
- package/references/security-system.md +1253 -0
- package/references/streaming.md +696 -0
- package/references/testing-framework.md +1151 -0
- package/references/time-travel.md +802 -0
- package/references/tool-registry.md +886 -0
- package/references/voice-commands.md +3296 -0
- package/scripts/setup-parallel-worktrees.sh +319 -0
- package/skills/memory-update.md +207 -0
- package/skills/review.md +331 -0
- package/skills/techdebt.md +289 -0
- package/skills/tutor.md +219 -0
- package/templates/.planning/notes/.gitkeep +0 -0
- package/templates/CLAUDE.md.template +48 -0
- package/templates/agent-marketplace-config.json +220 -0
- package/templates/agent-protocol-config.json +136 -0
- package/templates/ai-suggestions-config.json +100 -0
- package/templates/checkpoint-state.json +61 -0
- package/templates/collaboration-config.json +157 -0
- package/templates/collaborative-sessions-config.json +153 -0
- package/templates/configuration-config.json +245 -0
- package/templates/cost-tracking-config.json +148 -0
- package/templates/enterprise-sso-config.json +438 -0
- package/templates/error-handling-config.json +79 -2
- package/templates/events-config.json +148 -0
- package/templates/flow-visualization-config.json +196 -0
- package/templates/ide-integrations-config.json +442 -0
- package/templates/kubernetes-config.json +764 -0
- package/templates/memory-state.json +84 -0
- package/templates/mistakes.md.template +52 -0
- package/templates/mobile-companion-config.json +600 -0
- package/templates/multi-llm-config.json +544 -0
- package/templates/multi-project-memory-config.json +145 -0
- package/templates/observability-config.json +109 -0
- package/templates/patterns.md.template +114 -0
- package/templates/performance-profiler-config.json +125 -0
- package/templates/plugin-config.json +170 -0
- package/templates/prompt-management-config.json +86 -0
- package/templates/sandbox-config.json +185 -0
- package/templates/schemas-config.json +65 -0
- package/templates/security-config.json +120 -0
- package/templates/streaming-config.json +72 -0
- package/templates/testing-config.json +81 -0
- package/templates/timetravel-config.json +62 -0
- package/templates/tool-registry-config.json +109 -0
- package/templates/voice-commands-config.json +658 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parallel-worktrees
|
|
3
|
+
description: Guia para trabajo paralelo con git worktrees en ELSABRO
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trabajo Paralelo con Git Worktrees
|
|
8
|
+
|
|
9
|
+
## Concepto
|
|
10
|
+
|
|
11
|
+
Cuando ELSABRO ejecuta multiples agentes en paralelo, cada uno puede trabajar
|
|
12
|
+
en su propio worktree de git para evitar conflictos de archivos.
|
|
13
|
+
|
|
14
|
+
Un **worktree** es una copia de trabajo adicional del repositorio que comparte
|
|
15
|
+
el mismo directorio `.git` pero tiene su propio directorio de trabajo y branch.
|
|
16
|
+
|
|
17
|
+
## Beneficios
|
|
18
|
+
|
|
19
|
+
- **Aislamiento**: Cada agente trabaja en archivos separados
|
|
20
|
+
- **Sin conflictos**: No hay race conditions en archivos
|
|
21
|
+
- **Merge controlado**: Los cambios se integran explicitamente
|
|
22
|
+
- **Rollback facil**: Cada branch puede descartarse independientemente
|
|
23
|
+
|
|
24
|
+
## Flujo Automatico
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
1. /elsabro:execute detecta wave con multiples planes
|
|
28
|
+
|
|
|
29
|
+
2. Crea worktrees automaticos:
|
|
30
|
+
- elsabro-worktrees/analyst-wt/
|
|
31
|
+
- elsabro-worktrees/executor-wt/
|
|
32
|
+
- elsabro-worktrees/verifier-wt/
|
|
33
|
+
|
|
|
34
|
+
3. Cada agente trabaja en su worktree aislado
|
|
35
|
+
|
|
|
36
|
+
4. Al completar, merge automatico a branch principal
|
|
37
|
+
|
|
|
38
|
+
5. Cleanup de worktrees temporales
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Estructura de Directorios
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
proyecto/ # Repo principal
|
|
45
|
+
.git/ # Git compartido
|
|
46
|
+
src/
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
elsabro-worktrees/ # Directorio de worktrees (hermano del repo)
|
|
50
|
+
analyst-wt/ # Worktree del Analyst
|
|
51
|
+
src/
|
|
52
|
+
...
|
|
53
|
+
executor-wt/ # Worktree del Executor
|
|
54
|
+
src/
|
|
55
|
+
...
|
|
56
|
+
verifier-wt/ # Worktree del Verifier
|
|
57
|
+
src/
|
|
58
|
+
...
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Comandos del Script
|
|
62
|
+
|
|
63
|
+
### Crear Worktrees
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Crear worktrees para agentes especificos
|
|
67
|
+
./scripts/setup-parallel-worktrees.sh create analyst executor
|
|
68
|
+
|
|
69
|
+
# Crear worktrees para una wave completa
|
|
70
|
+
./scripts/setup-parallel-worktrees.sh create analyst executor verifier
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Merge Trabajo
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Merge trabajo de agentes al branch actual
|
|
77
|
+
./scripts/setup-parallel-worktrees.sh merge analyst executor
|
|
78
|
+
|
|
79
|
+
# El merge usa --no-edit con mensaje automatico
|
|
80
|
+
# Si hay conflictos, se pausa para resolucion manual
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Completar Wave
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Merge Y cleanup de una wave completa
|
|
87
|
+
./scripts/setup-parallel-worktrees.sh complete analyst executor verifier
|
|
88
|
+
|
|
89
|
+
# Equivalente a:
|
|
90
|
+
# merge analyst executor verifier
|
|
91
|
+
# cleanup analyst executor verifier
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Limpiar
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Limpiar worktrees especificos
|
|
98
|
+
./scripts/setup-parallel-worktrees.sh cleanup analyst
|
|
99
|
+
|
|
100
|
+
# Limpiar TODOS los worktrees de ELSABRO
|
|
101
|
+
./scripts/setup-parallel-worktrees.sh cleanup
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Ver Estado
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Mostrar status de worktrees y branches
|
|
108
|
+
./scripts/setup-parallel-worktrees.sh status
|
|
109
|
+
|
|
110
|
+
# Listar worktrees activos (git nativo)
|
|
111
|
+
./scripts/setup-parallel-worktrees.sh list
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Integracion con Orquestador
|
|
115
|
+
|
|
116
|
+
El `elsabro-orchestrator` usa worktrees automaticamente cuando:
|
|
117
|
+
|
|
118
|
+
1. **Multiples agentes en wave**: Hay mas de 1 agente en una wave
|
|
119
|
+
2. **Archivos conflictivos**: Los agentes modifican archivos potencialmente compartidos
|
|
120
|
+
3. **Profile careful**: Siempre aislado cuando profile es "careful"
|
|
121
|
+
|
|
122
|
+
### Configuracion en SESSION-STATE.json
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"parallel": {
|
|
127
|
+
"useWorktrees": true,
|
|
128
|
+
"activeWorktrees": [
|
|
129
|
+
{
|
|
130
|
+
"agent": "analyst",
|
|
131
|
+
"path": "../elsabro-worktrees/analyst-wt",
|
|
132
|
+
"branch": "elsabro/analyst"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"agent": "executor",
|
|
136
|
+
"path": "../elsabro-worktrees/executor-wt",
|
|
137
|
+
"branch": "elsabro/executor"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Resolucion de Conflictos
|
|
145
|
+
|
|
146
|
+
Si hay conflictos en el merge:
|
|
147
|
+
|
|
148
|
+
### Flujo Automatico
|
|
149
|
+
|
|
150
|
+
1. ELSABRO pausa la ejecucion
|
|
151
|
+
2. Muestra los conflictos al usuario
|
|
152
|
+
3. Presenta opciones interactivas
|
|
153
|
+
|
|
154
|
+
### Opciones del Usuario
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
Conflictos detectados en merge de 'executor':
|
|
158
|
+
|
|
159
|
+
Archivos en conflicto:
|
|
160
|
+
- src/api/user.ts
|
|
161
|
+
- src/utils/validation.ts
|
|
162
|
+
|
|
163
|
+
Opciones:
|
|
164
|
+
[r] Resolver manualmente (abre editor)
|
|
165
|
+
[k] Keep mine (descartar cambios del agente)
|
|
166
|
+
[t] Take theirs (aceptar cambios del agente)
|
|
167
|
+
[a] Abort (cancelar merge, mantener worktree)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Resolucion Manual
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Navegar al repo principal
|
|
174
|
+
cd proyecto
|
|
175
|
+
|
|
176
|
+
# Ver conflictos
|
|
177
|
+
git status
|
|
178
|
+
|
|
179
|
+
# Editar archivos conflictivos
|
|
180
|
+
# (buscar marcadores <<<<<<<, =======, >>>>>>>)
|
|
181
|
+
|
|
182
|
+
# Marcar como resueltos
|
|
183
|
+
git add src/api/user.ts
|
|
184
|
+
|
|
185
|
+
# Completar merge
|
|
186
|
+
git commit
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Limites y Requisitos
|
|
190
|
+
|
|
191
|
+
### Requisitos
|
|
192
|
+
|
|
193
|
+
- **Git >= 2.15**: Soporte completo de worktrees
|
|
194
|
+
- **Espacio en disco**: Cada worktree es una copia de trabajo completa
|
|
195
|
+
- **Permisos**: Escritura en directorio padre del repo
|
|
196
|
+
|
|
197
|
+
### Limites
|
|
198
|
+
|
|
199
|
+
| Limite | Valor | Razon |
|
|
200
|
+
|--------|-------|-------|
|
|
201
|
+
| Worktrees simultaneos | 5 | Performance y recursos |
|
|
202
|
+
| Ubicacion | `../elsabro-worktrees/` | Relativo al repo |
|
|
203
|
+
| Branches | `elsabro/*` | Namespace aislado |
|
|
204
|
+
|
|
205
|
+
### Verificar Requisitos
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Version de git
|
|
209
|
+
git --version
|
|
210
|
+
# Debe ser >= 2.15
|
|
211
|
+
|
|
212
|
+
# Espacio disponible
|
|
213
|
+
df -h .
|
|
214
|
+
|
|
215
|
+
# Permisos
|
|
216
|
+
ls -la ..
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Troubleshooting
|
|
220
|
+
|
|
221
|
+
### Worktree Huerfano
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Si un worktree queda en estado inconsistente
|
|
225
|
+
git worktree prune
|
|
226
|
+
|
|
227
|
+
# Forzar cleanup
|
|
228
|
+
./scripts/setup-parallel-worktrees.sh cleanup
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Branch No Existe
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Error: Branch elsabro/analyst no existe
|
|
235
|
+
# Solucion: Crear worktree de nuevo
|
|
236
|
+
./scripts/setup-parallel-worktrees.sh create analyst
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Merge Fallido
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Cancelar merge en progreso
|
|
243
|
+
git merge --abort
|
|
244
|
+
|
|
245
|
+
# Limpiar y reintentar
|
|
246
|
+
./scripts/setup-parallel-worktrees.sh cleanup analyst
|
|
247
|
+
./scripts/setup-parallel-worktrees.sh create analyst
|
|
248
|
+
# Re-ejecutar trabajo del agente
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Directorio Base No Existe
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
# El script crea automaticamente el directorio
|
|
255
|
+
# Si hay problemas de permisos:
|
|
256
|
+
mkdir -p ../elsabro-worktrees
|
|
257
|
+
chmod 755 ../elsabro-worktrees
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Ejemplo Completo
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# 1. Iniciar wave paralela
|
|
264
|
+
./scripts/setup-parallel-worktrees.sh create analyst executor verifier
|
|
265
|
+
|
|
266
|
+
# 2. Ver estado
|
|
267
|
+
./scripts/setup-parallel-worktrees.sh status
|
|
268
|
+
|
|
269
|
+
# Worktrees activos:
|
|
270
|
+
# /path/to/project abc1234 [main]
|
|
271
|
+
# /path/to/elsabro-worktrees/analyst-wt abc1234 [elsabro/analyst]
|
|
272
|
+
# /path/to/elsabro-worktrees/executor-wt abc1234 [elsabro/executor]
|
|
273
|
+
# /path/to/elsabro-worktrees/verifier-wt abc1234 [elsabro/verifier]
|
|
274
|
+
|
|
275
|
+
# 3. Agentes trabajan en sus worktrees...
|
|
276
|
+
|
|
277
|
+
# 4. Completar wave (merge + cleanup)
|
|
278
|
+
./scripts/setup-parallel-worktrees.sh complete analyst executor verifier
|
|
279
|
+
|
|
280
|
+
# 5. Verificar
|
|
281
|
+
git log --oneline -5
|
|
282
|
+
# abc1234 Merge: ELSABRO verifier parallel work
|
|
283
|
+
# def5678 Merge: ELSABRO executor parallel work
|
|
284
|
+
# ghi9012 Merge: ELSABRO analyst parallel work
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## Mejores Practicas
|
|
288
|
+
|
|
289
|
+
1. **Siempre usar `complete`**: Combina merge y cleanup en un paso
|
|
290
|
+
2. **Verificar antes de merge**: Revisar cambios con `git diff elsabro/agent`
|
|
291
|
+
3. **Cleanup regular**: No dejar worktrees huerfanos
|
|
292
|
+
4. **Commits atomicos**: Cada agente debe hacer commits completos
|
|
293
|
+
5. **Mensajes descriptivos**: Los commits en worktrees deben ser claros
|