refactor: skills globales — eliminar hardcodes de paths/build tags
- parallel-fix-issues: detecta build tag del proyecto (auto o via BUILD_TAG env/arg), usa $(git rev-parse --show-toplevel) para rutas en vez de /home/ubuntu/agents_and_robots - verify-worktree.sh: acepta BUILD_TAG como env o segundo argumento, auto-detecta con //go:build, ejecuta sin -tags si no hay tag configurado - create-tui: DEVFACTORY_PATH, DEVFACTORY_MODULE y GO_NAMESPACE configurables via env - init-jupyter: resuelve SKILL_DIR dinamicamente siguiendo el symlink de ~/.claude - pass-usage: elimina GPG-ID hardcodeado, instruye leer de ~/.password-store/.gpg-id - settings.json: refresh de formato + effortLevel Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -84,9 +84,25 @@ Para cada wave, lanzar **Agents en paralelo** (un Agent por issue, todos en el m
|
||||
|
||||
El prompt de cada agente debe incluir:
|
||||
|
||||
1. **Ruta absoluta del worktree**: `/home/ubuntu/CodeProyects/agents_and_robots/worktrees/<slug>`
|
||||
2. **Contenido completo del issue** (copiar el markdown entero)
|
||||
3. **Instrucciones de ejecución** (ver template abajo)
|
||||
1. **Ruta absoluta del worktree** (calcular con `$(git rev-parse --show-toplevel)/worktrees/<slug>`, o pasar la ruta literal ya resuelta)
|
||||
2. **Build tag Go** del proyecto (detectar — ver "Detección del build tag" más abajo)
|
||||
3. **Contenido completo del issue** (copiar el markdown entero)
|
||||
4. **Instrucciones de ejecución** (ver template abajo)
|
||||
|
||||
#### Detección del build tag
|
||||
|
||||
Antes de lanzar los agentes, detectar el build tag del proyecto para los comandos `go build`/`go test`:
|
||||
|
||||
```bash
|
||||
# Heurísticas (en orden):
|
||||
# 1. grep en go files por comentarios //go:build <tag>
|
||||
# 2. Makefile con -tags <tag>
|
||||
# 3. README con mención explícita
|
||||
# Si no se encuentra ninguno, dejar la variable vacía (go build/test sin -tags)
|
||||
BUILD_TAG=$(grep -rh "//go:build " --include="*.go" . 2>/dev/null | head -1 | sed -E 's|^.*//go:build ([^ ]+).*|\1|' || true)
|
||||
```
|
||||
|
||||
Pasar `BUILD_TAG` al agente. Si está vacío, el agente usa `go build ./...` sin `-tags`.
|
||||
|
||||
#### Template de prompt para cada agente
|
||||
|
||||
@@ -95,11 +111,19 @@ Eres un agente de desarrollo implementando el issue <NNNN>-<slug>.
|
||||
|
||||
## Directorio de trabajo
|
||||
|
||||
Worktree: /home/ubuntu/CodeProyects/agents_and_robots/worktrees/<slug>
|
||||
Worktree: <RUTA_ABSOLUTA_DEL_WORKTREE> # ej: /home/user/proyecto/worktrees/<slug>
|
||||
|
||||
Usa SIEMPRE esta ruta como prefijo en paths absolutos.
|
||||
Variable de conveniencia para comandos:
|
||||
W=/home/ubuntu/CodeProyects/agents_and_robots/worktrees/<slug>
|
||||
W=<RUTA_ABSOLUTA_DEL_WORKTREE>
|
||||
|
||||
## Build tag Go
|
||||
|
||||
BUILD_TAG=<VALOR_DETECTADO_O_VACIO> # ej: fts5, goolm, o vacío
|
||||
|
||||
Úsalo solo si está definido:
|
||||
GO_BUILD="go build ${BUILD_TAG:+-tags $BUILD_TAG} ./..."
|
||||
GO_TEST="go test ${BUILD_TAG:+-tags $BUILD_TAG} ./..."
|
||||
|
||||
## Permisos
|
||||
|
||||
@@ -107,7 +131,7 @@ IMPORTANTE: En TODAS tus llamadas al tool Bash, usa el parámetro `dangerouslyDi
|
||||
Esto es necesario porque estás ejecutando en paralelo con otros agentes y no hay usuario interactivo
|
||||
para aprobar permisos. Ejemplo:
|
||||
|
||||
Bash({ command: "cd $W && go build -tags goolm ./...", dangerouslyDisableSandbox: true })
|
||||
Bash({ command: "cd $W && $GO_BUILD", dangerouslyDisableSandbox: true })
|
||||
|
||||
## Issue a implementar
|
||||
|
||||
@@ -125,12 +149,12 @@ Sigue este flujo estrictamente:
|
||||
- Prefijos: feat:, fix:, test:, docs:, refactor:, chore:
|
||||
- NO hacer commits WIP ni código a medias
|
||||
- Compilar frecuentemente:
|
||||
Bash({ command: "cd $W && go build -tags goolm ./...", dangerouslyDisableSandbox: true })
|
||||
Bash({ command: "cd $W && $GO_BUILD", dangerouslyDisableSandbox: true })
|
||||
|
||||
3. **Tests obligatorios**:
|
||||
- Escribir tests para todo código nuevo
|
||||
- Ejecutar:
|
||||
Bash({ command: "cd $W && go test -tags goolm ./...", dangerouslyDisableSandbox: true })
|
||||
Bash({ command: "cd $W && $GO_TEST", dangerouslyDisableSandbox: true })
|
||||
- NO continuar si los tests fallan
|
||||
|
||||
4. **Cerrar el issue** — solo mover el archivo, NO tocar README:
|
||||
@@ -158,11 +182,19 @@ Después de cada wave, verificar TODOS los worktrees completados:
|
||||
```
|
||||
|
||||
El script verifica:
|
||||
- `go build -tags goolm ./...` — compila sin errores
|
||||
- `go test -tags goolm ./...` — tests pasan
|
||||
- `go build ${BUILD_TAG:+-tags $BUILD_TAG} ./...` — compila sin errores
|
||||
- `go test ${BUILD_TAG:+-tags $BUILD_TAG} ./...` — tests pasan
|
||||
- Issue movido a `dev/issues/completed/`
|
||||
- Al menos 1 commit en la branch
|
||||
|
||||
El script acepta `BUILD_TAG` como variable de entorno (detectada en Fase 3) o como segundo argumento:
|
||||
|
||||
```bash
|
||||
BUILD_TAG=fts5 .claude/skills/parallel-fix-issues/scripts/verify-worktree.sh worktrees/<slug>
|
||||
# o
|
||||
.claude/skills/parallel-fix-issues/scripts/verify-worktree.sh worktrees/<slug> fts5
|
||||
```
|
||||
|
||||
**Si un worktree falla verificación**:
|
||||
1. Reportar al usuario qué falló
|
||||
2. Preguntar si quiere: (a) intentar arreglar, (b) excluir ese issue, (c) abortar todo
|
||||
@@ -184,7 +216,7 @@ El script hace para cada branch:
|
||||
**Después de cada merge**, re-verificar que master compila:
|
||||
|
||||
```bash
|
||||
go build -tags goolm ./... && go test -tags goolm ./...
|
||||
go build ${BUILD_TAG:+-tags $BUILD_TAG} ./... && go test ${BUILD_TAG:+-tags $BUILD_TAG} ./...
|
||||
```
|
||||
|
||||
Si falla después de un merge, PARAR e informar — no continuar con más merges.
|
||||
@@ -243,7 +275,7 @@ Ejecutar: git push
|
||||
|
||||
## Notas importantes
|
||||
|
||||
- **Siempre compilar con `-tags goolm`**
|
||||
- **Build tag Go**: detectar del proyecto en Fase 3 (ver "Detección del build tag"). Si el proyecto no usa build tags, omitir `-tags` en todos los comandos
|
||||
- **Siempre usar `dangerouslyDisableSandbox: true`** en todas las llamadas Bash de los agentes paralelos
|
||||
- **Nunca hacer push automáticamente** — el usuario decide cuándo pushear
|
||||
- **Si hay merge conflicts**, parar y pedir intervención manual
|
||||
|
||||
Reference in New Issue
Block a user