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:
2026-04-18 17:04:34 +02:00
parent 3d77f4a5d2
commit e2a131a6dc
6 changed files with 104 additions and 37 deletions
@@ -1,13 +1,22 @@
#!/bin/bash
# verify-worktree.sh — Verifica build, tests y cierre de issue en un worktree
#
# Uso: ./verify-worktree.sh <worktree-path>
# Ejemplo: ./verify-worktree.sh worktrees/0026-split-runtime
# Uso: ./verify-worktree.sh <worktree-path> [build-tag]
# Ejemplos:
# ./verify-worktree.sh worktrees/0026-split-runtime fts5
# BUILD_TAG=goolm ./verify-worktree.sh worktrees/0026-split-runtime
# ./verify-worktree.sh worktrees/0026-split-runtime # sin -tags
#
# El build tag se puede pasar como:
# - segundo argumento posicional
# - variable de entorno BUILD_TAG
# - auto-detección via //go:build en los .go del worktree
# - si sigue vacío, ejecuta sin -tags
#
# Checks:
# 1. El worktree existe y tiene commits propios
# 2. go build -tags goolm ./... compila
# 3. go test -tags goolm ./... pasa
# 2. go build ${BUILD_TAG:+-tags $BUILD_TAG} ./... compila
# 3. go test ${BUILD_TAG:+-tags $BUILD_TAG} ./... pasa
# 4. El issue fue movido a completed/
#
# Exit codes:
@@ -22,11 +31,12 @@ set -euo pipefail
if [ $# -lt 1 ]; then
echo "ERROR: se necesita el path del worktree"
echo "Uso: $0 <worktree-path>"
echo "Uso: $0 <worktree-path> [build-tag]"
exit 1
fi
WORKTREE="$1"
BUILD_TAG="${2:-${BUILD_TAG:-}}"
# Resolver path absoluto
if [[ "$WORKTREE" != /* ]]; then
@@ -42,6 +52,25 @@ fi
SLUG="$(basename "$WORKTREE")"
echo "=== Verificando: ${SLUG} ==="
# Auto-detectar build tag si no se pasó
if [ -z "$BUILD_TAG" ]; then
AUTO_TAG=$(grep -rh "^//go:build " --include="*.go" "$WORKTREE" 2>/dev/null \
| sed -E 's|^//go:build ([a-zA-Z0-9_]+).*|\1|' \
| sort -u \
| head -1 || true)
if [ -n "$AUTO_TAG" ]; then
BUILD_TAG="$AUTO_TAG"
echo "INFO: build tag auto-detectado: ${BUILD_TAG}"
else
echo "INFO: sin build tag (go build/test sin -tags)"
fi
fi
TAG_FLAG=""
if [ -n "$BUILD_TAG" ]; then
TAG_FLAG="-tags $BUILD_TAG"
fi
# 1. Verificar commits propios
echo "--- Commits propios ---"
COMMIT_COUNT=$(cd "$WORKTREE" && git log master..HEAD --oneline 2>/dev/null | wc -l)
@@ -54,8 +83,8 @@ cd "$WORKTREE" && git log master..HEAD --oneline
# 2. Build
echo ""
echo "--- Build ---"
if (cd "$WORKTREE" && go build -tags goolm ./... 2>&1); then
echo "--- Build (go build $TAG_FLAG ./...) ---"
if (cd "$WORKTREE" && go build $TAG_FLAG ./... 2>&1); then
echo "OK: build exitoso"
else
echo "FAIL: build falló"
@@ -64,8 +93,8 @@ fi
# 3. Tests
echo ""
echo "--- Tests ---"
if (cd "$WORKTREE" && go test -tags goolm ./... 2>&1); then
echo "--- Tests (go test $TAG_FLAG ./...) ---"
if (cd "$WORKTREE" && go test $TAG_FLAG ./... 2>&1); then
echo "OK: tests pasaron"
else
echo "FAIL: tests fallaron"
@@ -81,7 +110,6 @@ if [ "$COMPLETED_FILES" -gt 0 ]; then
cd "$WORKTREE" && git diff --name-only master -- dev/issues/completed/
else
echo "WARN: no se detectó issue movido a completed/ (verificar manualmente)"
# No es un error fatal — puede que el issue no siga la convención exacta
fi
echo ""