clinica-veterinaria/orchestration/_archive/directivas/triggers/TRIGGER-COMMIT-PUSH-OBLIGATORIO.md
Adrian Flores Cortes 8bb46e4d08 [ESTANDAR-ORCHESTRATION] refactor: Consolidate to standard structure
- Move 6 non-standard folders to _archive/
- Update _MAP.md with standardized structure

Standard: SIMCO-ESTANDAR-ORCHESTRATION v1.0.0
Level: SUB-CONSUMER

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 14:38:02 -06:00

5.8 KiB

TRIGGER: Commit y Push Obligatorio

Version: 1.0.0 Fecha: 2026-01-16 Tipo: AUTOMATICO Prioridad: CRITICA


ACTIVACION

Este trigger se activa AUTOMATICAMENTE cuando:

  1. Se completa una tarea que creo o modifico archivos
  2. Se marca un todo como "completed"
  3. Se reporta al usuario que una tarea esta finalizada
  4. Se cambia de contexto a otra tarea
  5. Antes de finalizar una sesion de trabajo

ACCION OBLIGATORIA

╔══════════════════════════════════════════════════════════════════════════╗
║                                                                           ║
║   ANTES DE REPORTAR TAREA COMPLETADA:                                    ║
║                                                                           ║
║   1. Ejecutar: git status                                                 ║
║      - Si hay cambios pendientes -> continuar                            ║
║      - Si esta limpio -> verificar que push se hizo                      ║
║                                                                           ║
║   2. Si hay cambios:                                                      ║
║      git add .                                                            ║
║      git commit -m "[TAREA-ID] tipo: descripcion"                        ║
║      git push origin main                                                 ║
║                                                                           ║
║   3. Si hay SUBMODULES modificados:                                      ║
║      - Commitear y push en CADA submodule primero                        ║
║      - Luego actualizar workspace principal                              ║
║                                                                           ║
║   4. Verificar sincronizacion:                                           ║
║      git log origin/main..HEAD --oneline                                 ║
║      - Debe estar VACIO (sin commits pendientes de push)                 ║
║                                                                           ║
╚══════════════════════════════════════════════════════════════════════════╝

SECUENCIA WORKSPACE-V2

El workspace-v2 usa submodules. Secuencia obligatoria:

# PASO 1: Identificar submodules modificados
cd /home/isem/workspace-v2
git status

# PASO 2: Para CADA submodule con cambios
cd projects/{submodule}
git add .
git commit -m "[{submodule}] tipo: descripcion"
git push origin main
cd ../..

# PASO 3: Actualizar workspace principal
git add .
git commit -m "[WORKSPACE] chore: descripcion de cambios"
git push origin main

# PASO 4: Verificar TODO sincronizado
git status  # Debe mostrar "clean"
git submodule foreach 'git status'  # Todos deben estar "clean"

ERRORES A EVITAR

Error Consecuencia Prevencion
No hacer push Archivos solo en local Siempre push despues de commit
Olvidar submodules Referencias desincronizadas Commitear submodules primero
Reportar sin verificar Usuario cree que esta hecho Verificar git status antes
Commitear sin push Cambios no en remoto Push inmediato tras commit

VERIFICACION RAPIDA

# Comando unico para verificar todo sincronizado
git status && git log origin/main..HEAD --oneline

# Salida esperada:
# On branch main
# Your branch is up to date with 'origin/main'.
# nothing to commit, working tree clean
# (sin output del log = todo pusheado)

INTEGRACION CON CAPVED

Este trigger se ejecuta en:

  • Fase E (Ejecucion): Commit atomico por cada cambio logico
  • Fase D (Documentacion): Commit final con documentacion
  • Post-Tarea: Push OBLIGATORIO antes de reportar completado
fase_D_documentacion:
  ultimo_paso: "Commit + Push de todos los cambios"
  verificacion: "git status clean + git log empty"
  reportar_solo_si: "Todo sincronizado con remoto"

MENSAJE AL AGENTE

╔══════════════════════════════════════════════════════════════════════════╗
║                                                                           ║
║   RECUERDA: Una tarea NO esta completa hasta que:                        ║
║                                                                           ║
║   1. Todos los archivos estan GUARDADOS en disco                         ║
║   2. Todos los cambios estan COMMITEADOS                                 ║
║   3. Todos los commits estan PUSHEADOS al remoto                         ║
║   4. git status muestra "working tree clean"                             ║
║   5. git log origin/main..HEAD esta VACIO                                ║
║                                                                           ║
║   SIN PUSH = TRABAJO PERDIDO POTENCIAL                                   ║
║                                                                           ║
╚══════════════════════════════════════════════════════════════════════════╝

REFERENCIAS

  • SIMCO-GIT.md - Directiva principal de control de versiones
  • PRINCIPIO-CAPVED.md - Ciclo de vida de tareas
  • SIMCO-TAREA.md - Punto de entrada de tareas

Sistema: SIMCO v4.0.0 Mantenido por: Workspace Admin