swl-ses 3.3.2
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/CLAUDE.md +425 -0
- package/_userland/agentes/.gitkeep +0 -0
- package/_userland/habilidades/.gitkeep +0 -0
- package/agentes/accesibilidad-wcag-swl.md +683 -0
- package/agentes/arquitecto-swl.md +210 -0
- package/agentes/auto-evolucion-swl.md +408 -0
- package/agentes/backend-api-swl.md +442 -0
- package/agentes/backend-node-swl.md +439 -0
- package/agentes/backend-python-swl.md +469 -0
- package/agentes/backend-workers-swl.md +444 -0
- package/agentes/cloud-infra-swl.md +466 -0
- package/agentes/consolidador-swl.md +487 -0
- package/agentes/datos-swl.md +568 -0
- package/agentes/depurador-swl.md +301 -0
- package/agentes/devops-ci-swl.md +352 -0
- package/agentes/disenador-ui-swl.md +546 -0
- package/agentes/documentador-swl.md +323 -0
- package/agentes/frontend-angular-swl.md +603 -0
- package/agentes/frontend-css-swl.md +700 -0
- package/agentes/frontend-react-swl.md +672 -0
- package/agentes/frontend-swl.md +483 -0
- package/agentes/frontend-tailwind-swl.md +808 -0
- package/agentes/implementador-swl.md +235 -0
- package/agentes/investigador-swl.md +274 -0
- package/agentes/investigador-ux-swl.md +482 -0
- package/agentes/migrador-swl.md +389 -0
- package/agentes/mobile-android-swl.md +473 -0
- package/agentes/mobile-cross-swl.md +501 -0
- package/agentes/mobile-ios-swl.md +464 -0
- package/agentes/notificador-swl.md +886 -0
- package/agentes/observabilidad-swl.md +408 -0
- package/agentes/orquestador-swl.md +490 -0
- package/agentes/planificador-swl.md +222 -0
- package/agentes/producto-prd-swl.md +565 -0
- package/agentes/release-manager-swl.md +545 -0
- package/agentes/rendimiento-swl.md +691 -0
- package/agentes/revisor-codigo-swl.md +254 -0
- package/agentes/revisor-seguridad-swl.md +316 -0
- package/agentes/tdd-qa-swl.md +323 -0
- package/agentes/ux-disenador-swl.md +498 -0
- package/bin/swl-ses.js +119 -0
- package/comandos/swl/actualizar.md +117 -0
- package/comandos/swl/aprender.md +348 -0
- package/comandos/swl/auditar-deps.md +390 -0
- package/comandos/swl/autoresearch.md +346 -0
- package/comandos/swl/checkpoint.md +296 -0
- package/comandos/swl/compactar.md +283 -0
- package/comandos/swl/crear-skill.md +609 -0
- package/comandos/swl/discutir-fase.md +230 -0
- package/comandos/swl/ejecutar-fase.md +302 -0
- package/comandos/swl/evolucionar.md +377 -0
- package/comandos/swl/instalar.md +220 -0
- package/comandos/swl/mapear-codebase.md +205 -0
- package/comandos/swl/nuevo-proyecto.md +154 -0
- package/comandos/swl/planear-fase.md +221 -0
- package/comandos/swl/release.md +405 -0
- package/comandos/swl/salud.md +382 -0
- package/comandos/swl/verificar.md +292 -0
- package/habilidades/accesibilidad-a11y/SKILL.md +584 -0
- package/habilidades/angular-avanzado/SKILL.md +491 -0
- package/habilidades/angular-moderno/SKILL.md +326 -0
- package/habilidades/api-rest-diseno/SKILL.md +302 -0
- package/habilidades/api-rest-diseno/recursos/openapi-template.yaml +506 -0
- package/habilidades/aprendizaje-continuo/SKILL.md +369 -0
- package/habilidades/async-python/SKILL.md +474 -0
- package/habilidades/auth-patrones/SKILL.md +488 -0
- package/habilidades/auto-evolucion-protocolo/SKILL.md +376 -0
- package/habilidades/autoresearch/SKILL.md +248 -0
- package/habilidades/autoresearch/recursos/checklist-template.md +191 -0
- package/habilidades/autoresearch/scripts/calcular-score.js +88 -0
- package/habilidades/checklist-calidad/SKILL.md +247 -0
- package/habilidades/checklist-calidad/recursos/quality-report-template.md +148 -0
- package/habilidades/checklist-seguridad/SKILL.md +224 -0
- package/habilidades/checkpoints-verificacion/SKILL.md +309 -0
- package/habilidades/checkpoints-verificacion/recursos/checkpoint-templates.md +360 -0
- package/habilidades/ci-cd-pipelines/SKILL.md +583 -0
- package/habilidades/ci-cd-pipelines/recursos/github-actions-template.yaml +403 -0
- package/habilidades/cloud-aws/SKILL.md +497 -0
- package/habilidades/compactacion-contexto/SKILL.md +201 -0
- package/habilidades/contenedores-docker/SKILL.md +453 -0
- package/habilidades/contenedores-docker/recursos/dockerfile-template.dockerfile +160 -0
- package/habilidades/css-moderno/SKILL.md +463 -0
- package/habilidades/datos-etl/SKILL.md +486 -0
- package/habilidades/dependencias-auditoria/SKILL.md +293 -0
- package/habilidades/deprecacion-migracion/SKILL.md +485 -0
- package/habilidades/design-tokens/SKILL.md +519 -0
- package/habilidades/discutir-fase/SKILL.md +167 -0
- package/habilidades/diseno-responsivo/SKILL.md +326 -0
- package/habilidades/django-experto/SKILL.md +395 -0
- package/habilidades/doc-sync/SKILL.md +259 -0
- package/habilidades/ejecutar-fase/SKILL.md +199 -0
- package/habilidades/estructura-proyecto-claude/SKILL.md +459 -0
- package/habilidades/estructura-proyecto-claude/recursos/claude-md-template.md +261 -0
- package/habilidades/estructura-proyecto-claude/recursos/frontmatter-y-hooks-referencia.md +213 -0
- package/habilidades/estructura-proyecto-claude/recursos/mcp-json-template.json +77 -0
- package/habilidades/estructura-proyecto-claude/recursos/variantes-por-stack.md +177 -0
- package/habilidades/event-driven/SKILL.md +580 -0
- package/habilidades/extractor-de-aprendizajes/SKILL.md +234 -0
- package/habilidades/fastapi-experto/SKILL.md +368 -0
- package/habilidades/frontend-avanzado/SKILL.md +555 -0
- package/habilidades/git-worktrees-paralelo/SKILL.md +246 -0
- package/habilidades/iam-secretos/SKILL.md +511 -0
- package/habilidades/instalar-sistema/SKILL.md +140 -0
- package/habilidades/kubernetes-orquestacion/SKILL.md +549 -0
- package/habilidades/manejo-errores/SKILL.md +512 -0
- package/habilidades/mapear-codebase/SKILL.md +199 -0
- package/habilidades/microservicios/SKILL.md +473 -0
- package/habilidades/mobile-flutter/SKILL.md +566 -0
- package/habilidades/mobile-react-native/SKILL.md +493 -0
- package/habilidades/monitoring-alertas/SKILL.md +447 -0
- package/habilidades/node-experto/SKILL.md +521 -0
- package/habilidades/notificaciones-multicanal/SKILL.md +448 -0
- package/habilidades/notificaciones-multicanal/recursos/config-template.json +115 -0
- package/habilidades/nuevo-proyecto/SKILL.md +183 -0
- package/habilidades/patrones-python/SKILL.md +381 -0
- package/habilidades/performance-baseline/SKILL.md +243 -0
- package/habilidades/planear-fase/SKILL.md +184 -0
- package/habilidades/postgresql-experto/SKILL.md +379 -0
- package/habilidades/react-experto/SKILL.md +434 -0
- package/habilidades/react-optimizacion/SKILL.md +328 -0
- package/habilidades/release-semver/SKILL.md +226 -0
- package/habilidades/release-semver/scripts/generar-changelog.sh +238 -0
- package/habilidades/sql-optimizacion/SKILL.md +314 -0
- package/habilidades/tailwind-experto/SKILL.md +412 -0
- package/habilidades/tdd-workflow/SKILL.md +267 -0
- package/habilidades/testing-python/SKILL.md +350 -0
- package/habilidades/threat-model-lite/SKILL.md +218 -0
- package/habilidades/typescript-avanzado/SKILL.md +454 -0
- package/habilidades/ux-diseno/SKILL.md +488 -0
- package/habilidades/validacion-ci-sistema/SKILL.md +543 -0
- package/habilidades/validacion-ci-sistema/scripts/validar-sistema.sh +286 -0
- package/habilidades/verificar-trabajo/SKILL.md +208 -0
- package/habilidades/wireframes-flujos/SKILL.md +396 -0
- package/habilidades/workflow-claude-code/SKILL.md +359 -0
- package/hooks/calidad-pre-commit.js +578 -0
- package/hooks/escaneo-secretos.js +302 -0
- package/hooks/extraccion-aprendizajes.js +550 -0
- package/hooks/linea-estado.js +249 -0
- package/hooks/monitor-contexto.js +230 -0
- package/hooks/proteccion-rutas.js +249 -0
- package/manifiestos/hooks-config.json +41 -0
- package/manifiestos/modulos.json +318 -0
- package/manifiestos/perfiles.json +189 -0
- package/package.json +45 -0
- package/plantillas/PROJECT.md +122 -0
- package/plantillas/REQUIREMENTS.md +132 -0
- package/plantillas/ROADMAP.md +143 -0
- package/plantillas/STATE.md +109 -0
- package/plantillas/research/ARCHITECTURE.md +220 -0
- package/plantillas/research/FEATURES.md +175 -0
- package/plantillas/research/PITFALLS.md +299 -0
- package/plantillas/research/STACK.md +233 -0
- package/plantillas/research/SUMMARY.md +165 -0
- package/plugin.json +144 -0
- package/reglas/accesibilidad.md +269 -0
- package/reglas/api-diseno.md +400 -0
- package/reglas/arquitectura.md +183 -0
- package/reglas/cloud-infra.md +247 -0
- package/reglas/docs.md +245 -0
- package/reglas/estilo-codigo.md +179 -0
- package/reglas/git-workflow.md +186 -0
- package/reglas/performance.md +195 -0
- package/reglas/pruebas.md +159 -0
- package/reglas/seguridad.md +151 -0
- package/reglas/skills-estandar.md +473 -0
- package/scripts/actualizar.js +51 -0
- package/scripts/desinstalar.js +86 -0
- package/scripts/doctor.js +222 -0
- package/scripts/inicializar.js +89 -0
- package/scripts/instalador.js +333 -0
- package/scripts/lib/detectar-runtime.js +177 -0
- package/scripts/lib/estado.js +112 -0
- package/scripts/lib/hooks-settings.js +283 -0
- package/scripts/lib/manifiestos.js +138 -0
- package/scripts/lib/seguridad.js +160 -0
- package/scripts/publicar.js +209 -0
- package/scripts/validar.js +120 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-worktrees-paralelo
|
|
3
|
+
description: Uso de git worktrees para ejecución paralela de agentes. Crear, usar y limpiar worktrees de forma segura para que múltiples agentes trabajen sin conflictos.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Git Worktrees para Ejecución Paralela
|
|
7
|
+
|
|
8
|
+
## Qué es un worktree
|
|
9
|
+
|
|
10
|
+
Un **git worktree** permite tener múltiples directorios de trabajo conectados al mismo
|
|
11
|
+
repositorio. Cada worktree tiene su propio árbol de trabajo y puede estar en una rama
|
|
12
|
+
distinta, pero comparten el objeto store de Git (commits, blobs, trees). Esto es ideal
|
|
13
|
+
para agentes paralelos: cada uno trabaja en su propia rama y su propio directorio sin
|
|
14
|
+
interferir con los demás.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Cuándo usar worktrees
|
|
19
|
+
|
|
20
|
+
- Múltiples agentes ejecutando tareas en paralelo sobre el mismo repo.
|
|
21
|
+
- Trabajar en un hotfix mientras el desarrollo principal sigue en `main`.
|
|
22
|
+
- Revisar el código de una rama sin perder el contexto de la rama actual.
|
|
23
|
+
- Ejecutar la suite de tests de una rama sin hacer checkout.
|
|
24
|
+
- Comparar implementaciones de dos ramas side-by-side.
|
|
25
|
+
|
|
26
|
+
**No usar worktrees cuando:**
|
|
27
|
+
- Solo hay un agente trabajando. Un checkout normal es suficiente.
|
|
28
|
+
- Las tareas tienen dependencias de orden entre sí.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Comandos esenciales
|
|
33
|
+
|
|
34
|
+
### Crear un worktree
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Sintaxis básica
|
|
38
|
+
git worktree add <ruta> <rama>
|
|
39
|
+
|
|
40
|
+
# Crear worktree en rama existente
|
|
41
|
+
git worktree add ../mi-proyecto-feature feature/login
|
|
42
|
+
|
|
43
|
+
# Crear worktree con nueva rama desde HEAD
|
|
44
|
+
git worktree add -b feature/nueva-ruta ../mi-proyecto-nueva-ruta
|
|
45
|
+
|
|
46
|
+
# Crear worktree con nueva rama desde commit específico
|
|
47
|
+
git worktree add -b hotfix/auth ../mi-proyecto-hotfix origin/main
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Listar worktrees activos
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git worktree list
|
|
54
|
+
# Salida:
|
|
55
|
+
# /ruta/repo-principal abc1234 [main]
|
|
56
|
+
# /ruta/repo-feature def5678 [feature/login]
|
|
57
|
+
# /ruta/repo-hotfix ghi9012 [hotfix/auth]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Eliminar un worktree
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Primero quitar el directorio, luego limpiar la referencia
|
|
64
|
+
git worktree remove ../mi-proyecto-feature
|
|
65
|
+
|
|
66
|
+
# Forzar si el directorio tiene cambios sin commitear (cuidado)
|
|
67
|
+
git worktree remove --force ../mi-proyecto-feature
|
|
68
|
+
|
|
69
|
+
# Limpiar referencias a worktrees eliminados manualmente
|
|
70
|
+
git worktree prune
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Mover un worktree
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git worktree move ../mi-proyecto-feature ../nueva-ubicacion
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Patrón de trabajo para agentes paralelos
|
|
82
|
+
|
|
83
|
+
### Estructura de directorios recomendada
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
proyectos/
|
|
87
|
+
├── mi-app/ # Worktree principal (main)
|
|
88
|
+
├── mi-app-agente-1/ # Worktree para Agente 1 (feature/modulo-a)
|
|
89
|
+
├── mi-app-agente-2/ # Worktree para Agente 2 (feature/modulo-b)
|
|
90
|
+
└── mi-app-agente-3/ # Worktree para Agente 3 (feature/modulo-c)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Flujo completo: lanzar agentes paralelos
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# 1. Asegurarse de estar en main actualizado
|
|
97
|
+
cd /ruta/mi-app
|
|
98
|
+
git checkout main
|
|
99
|
+
git pull origin main
|
|
100
|
+
|
|
101
|
+
# 2. Crear worktrees para cada agente
|
|
102
|
+
git worktree add -b feature/modulo-usuarios ../mi-app-agente-1
|
|
103
|
+
git worktree add -b feature/modulo-reportes ../mi-app-agente-2
|
|
104
|
+
git worktree add -b feature/modulo-notificaciones ../mi-app-agente-3
|
|
105
|
+
|
|
106
|
+
# 3. Cada agente trabaja en su propio directorio
|
|
107
|
+
# Agente 1 → cd ../mi-app-agente-1
|
|
108
|
+
# Agente 2 → cd ../mi-app-agente-2
|
|
109
|
+
# Agente 3 → cd ../mi-app-agente-3
|
|
110
|
+
|
|
111
|
+
# 4. Los agentes hacen commits normalmente dentro de su worktree
|
|
112
|
+
cd ../mi-app-agente-1
|
|
113
|
+
git add .
|
|
114
|
+
git commit -m "feat(usuarios): implementa CRUD de usuarios"
|
|
115
|
+
|
|
116
|
+
# 5. Al terminar, crear PRs o mergear
|
|
117
|
+
cd /ruta/mi-app
|
|
118
|
+
git merge feature/modulo-usuarios
|
|
119
|
+
|
|
120
|
+
# 6. Limpiar worktrees terminados
|
|
121
|
+
git worktree remove ../mi-app-agente-1
|
|
122
|
+
git worktree remove ../mi-app-agente-2
|
|
123
|
+
git worktree remove ../mi-app-agente-3
|
|
124
|
+
git worktree prune
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Reglas de seguridad para worktrees paralelos
|
|
130
|
+
|
|
131
|
+
### La misma rama NO puede estar en dos worktrees
|
|
132
|
+
|
|
133
|
+
Git prohíbe hacer checkout de la misma rama en dos worktrees. Si se intenta:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
git worktree add ../copia-main main
|
|
137
|
+
# fatal: 'main' is already checked out at '/ruta/repo-principal'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Solución: cada agente SIEMPRE trabaja en su propia rama, nunca en la misma.
|
|
141
|
+
|
|
142
|
+
### Archivos de bloqueo compartidos
|
|
143
|
+
|
|
144
|
+
Los hooks de Git se ejecutan desde el directorio `.git` compartido. Si dos agentes
|
|
145
|
+
ejecutan hooks simultáneamente puede haber condiciones de carrera. Usar ramas
|
|
146
|
+
completamente independientes minimiza este riesgo.
|
|
147
|
+
|
|
148
|
+
### Variables de entorno por worktree
|
|
149
|
+
|
|
150
|
+
Cada proceso de agente debe tener `GIT_DIR` implícito resuelto desde su CWD, no
|
|
151
|
+
configurado manualmente. Nunca exportar `GIT_DIR` de forma global si hay múltiples
|
|
152
|
+
worktrees activos.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Integración con agentes del sistema SWL
|
|
157
|
+
|
|
158
|
+
### Estado en STATE.md por worktree
|
|
159
|
+
|
|
160
|
+
Cada agente debe registrar en su `STATE.md` local:
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
## Worktree
|
|
164
|
+
- Ruta: /ruta/mi-app-agente-1
|
|
165
|
+
- Rama: feature/modulo-usuarios
|
|
166
|
+
- Worktree base: /ruta/mi-app (main @ abc1234)
|
|
167
|
+
- Creado: 2026-03-25T10:00:00
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Protocolo de limpieza
|
|
171
|
+
|
|
172
|
+
El agente coordinador (orquestador) es responsable de:
|
|
173
|
+
1. Crear los worktrees ANTES de lanzar los agentes.
|
|
174
|
+
2. Verificar que cada agente terminó (commit final presente).
|
|
175
|
+
3. Mergear las ramas al trunk.
|
|
176
|
+
4. Eliminar los worktrees con `git worktree remove`.
|
|
177
|
+
5. Borrar las ramas de feature si ya fueron mergeadas.
|
|
178
|
+
|
|
179
|
+
### Script de limpieza completa
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
#!/usr/bin/env bash
|
|
183
|
+
# cleanup-worktrees.sh
|
|
184
|
+
set -euo pipefail
|
|
185
|
+
|
|
186
|
+
REPO_ROOT="/ruta/mi-app"
|
|
187
|
+
cd "$REPO_ROOT"
|
|
188
|
+
|
|
189
|
+
echo "Worktrees activos:"
|
|
190
|
+
git worktree list
|
|
191
|
+
|
|
192
|
+
echo "Limpiando worktrees terminados..."
|
|
193
|
+
git worktree prune
|
|
194
|
+
|
|
195
|
+
echo "Estado final:"
|
|
196
|
+
git worktree list
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Troubleshooting común
|
|
202
|
+
|
|
203
|
+
### El worktree quedó en estado corrupto
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
# Verificar integridad
|
|
207
|
+
git fsck
|
|
208
|
+
|
|
209
|
+
# Si el directorio ya no existe pero el worktree está registrado
|
|
210
|
+
git worktree prune --verbose
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Conflicto al intentar hacer checkout en el worktree principal
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Ver en qué worktree está cada rama
|
|
217
|
+
git worktree list --porcelain
|
|
218
|
+
|
|
219
|
+
# Ir al worktree donde está la rama y hacer el trabajo ahí
|
|
220
|
+
cd /ruta/worktree-con-esa-rama
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Cambios sin commitear en un worktree al intentar eliminarlo
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Opción 1: Commitear antes
|
|
227
|
+
cd ../mi-app-agente-1
|
|
228
|
+
git stash # o git commit
|
|
229
|
+
|
|
230
|
+
# Opción 2: Forzar eliminación (se pierden cambios)
|
|
231
|
+
cd /ruta/mi-app
|
|
232
|
+
git worktree remove --force ../mi-app-agente-1
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Resumen de comandos
|
|
238
|
+
|
|
239
|
+
| Comando | Acción |
|
|
240
|
+
|---------|--------|
|
|
241
|
+
| `git worktree add <ruta> <rama>` | Crear worktree en rama existente |
|
|
242
|
+
| `git worktree add -b <rama> <ruta>` | Crear worktree con rama nueva |
|
|
243
|
+
| `git worktree list` | Listar todos los worktrees |
|
|
244
|
+
| `git worktree remove <ruta>` | Eliminar worktree limpiamente |
|
|
245
|
+
| `git worktree prune` | Limpiar referencias obsoletas |
|
|
246
|
+
| `git worktree move <src> <dst>` | Mover worktree a nueva ruta |
|