Sistema NEXUS v3.4 migrado con: Estructura principal: - core/orchestration: Sistema SIMCO + CAPVED (27 directivas, 28 perfiles) - core/catalog: Catalogo de funcionalidades reutilizables - shared/knowledge-base: Base de conocimiento compartida - devtools/scripts: Herramientas de desarrollo - control-plane/registries: Control de servicios y CI/CD - orchestration/: Configuracion de orquestacion de agentes Proyectos incluidos (11): - gamilit (submodule -> GitHub) - trading-platform (OrbiquanTIA) - erp-suite con 5 verticales: - erp-core, construccion, vidrio-templado - mecanicas-diesel, retail, clinicas - betting-analytics - inmobiliaria-analytics - platform_marketing_content - pos-micro, erp-basico Configuracion: - .gitignore completo para Node.js/Python/Docker - gamilit como submodule (git@github.com:rckrdmrd/gamilit-workspace.git) - Sistema de puertos estandarizado (3005-3199) Generated with NEXUS v3.4 Migration System EPIC-010: Configuracion Git y Repositorios
144 lines
3.4 KiB
Bash
Executable File
144 lines
3.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# validate-kb.sh - Validador de Knowledge Base
|
|
# Sistema: NEXUS v3.4 + SIMCO
|
|
# Fecha: 2026-01-04
|
|
|
|
set -e
|
|
|
|
KB_PATH="/home/isem/workspace-v1/shared/knowledge-base"
|
|
ERRORS=0
|
|
WARNINGS=0
|
|
|
|
echo "============================================"
|
|
echo " VALIDADOR DE KNOWLEDGE BASE"
|
|
echo " Sistema NEXUS v3.4"
|
|
echo "============================================"
|
|
echo ""
|
|
|
|
# 1. Verificar estructura base
|
|
echo "[1/6] Verificando estructura base..."
|
|
REQUIRED_DIRS=(
|
|
"modules"
|
|
"platforms"
|
|
"templates"
|
|
)
|
|
|
|
for dir in "${REQUIRED_DIRS[@]}"; do
|
|
if [ -d "$KB_PATH/$dir" ]; then
|
|
echo " [OK] $dir/"
|
|
else
|
|
echo " [ERROR] $dir/ no existe"
|
|
((ERRORS++))
|
|
fi
|
|
done
|
|
|
|
# 2. Verificar archivos principales
|
|
echo ""
|
|
echo "[2/6] Verificando archivos principales..."
|
|
REQUIRED_FILES=(
|
|
"README.md"
|
|
"CATALOGO-MODULOS.yml"
|
|
"TRAZABILIDAD-PROYECTOS.yml"
|
|
)
|
|
|
|
for file in "${REQUIRED_FILES[@]}"; do
|
|
if [ -f "$KB_PATH/$file" ]; then
|
|
echo " [OK] $file"
|
|
else
|
|
echo " [ERROR] $file no existe"
|
|
((ERRORS++))
|
|
fi
|
|
done
|
|
|
|
# 3. Verificar categorias de modulos
|
|
echo ""
|
|
echo "[3/6] Verificando categorias de modulos..."
|
|
EXPECTED_CATEGORIES=(
|
|
"authentication"
|
|
"payments"
|
|
"notifications"
|
|
"user-management"
|
|
"ui-components"
|
|
"api-patterns"
|
|
"database-patterns"
|
|
"integrations"
|
|
)
|
|
|
|
for cat in "${EXPECTED_CATEGORIES[@]}"; do
|
|
if [ -d "$KB_PATH/modules/$cat" ]; then
|
|
if [ -f "$KB_PATH/modules/$cat/_INDEX.md" ]; then
|
|
echo " [OK] modules/$cat/ (con _INDEX.md)"
|
|
else
|
|
echo " [WARN] modules/$cat/ (falta _INDEX.md)"
|
|
((WARNINGS++))
|
|
fi
|
|
else
|
|
echo " [ERROR] modules/$cat/ no existe"
|
|
((ERRORS++))
|
|
fi
|
|
done
|
|
|
|
# 4. Verificar plataformas
|
|
echo ""
|
|
echo "[4/6] Verificando plataformas..."
|
|
EXPECTED_PLATFORMS=(
|
|
"saas-base"
|
|
"erp-base"
|
|
"gamification-platform"
|
|
)
|
|
|
|
for plat in "${EXPECTED_PLATFORMS[@]}"; do
|
|
if [ -d "$KB_PATH/platforms/$plat" ]; then
|
|
if [ -f "$KB_PATH/platforms/$plat/README.md" ]; then
|
|
echo " [OK] platforms/$plat/ (con README.md)"
|
|
else
|
|
echo " [WARN] platforms/$plat/ (falta README.md)"
|
|
((WARNINGS++))
|
|
fi
|
|
else
|
|
echo " [WARN] platforms/$plat/ no existe"
|
|
((WARNINGS++))
|
|
fi
|
|
done
|
|
|
|
# 5. Contar modulos documentados
|
|
echo ""
|
|
echo "[5/6] Contando modulos documentados..."
|
|
MODULE_COUNT=$(find "$KB_PATH/modules" -mindepth 2 -name "README.md" 2>/dev/null | wc -l)
|
|
echo " Modulos con README.md: $MODULE_COUNT"
|
|
|
|
if [ "$MODULE_COUNT" -lt 3 ]; then
|
|
echo " [WARN] Menos de 3 modulos documentados"
|
|
((WARNINGS++))
|
|
else
|
|
echo " [OK] Suficientes modulos documentados"
|
|
fi
|
|
|
|
# 6. Verificar templates
|
|
echo ""
|
|
echo "[6/6] Verificando templates..."
|
|
if [ -d "$KB_PATH/templates/module-template" ]; then
|
|
TEMPLATE_FILES=$(ls "$KB_PATH/templates/module-template/" | wc -l)
|
|
echo " [OK] module-template/ ($TEMPLATE_FILES archivos)"
|
|
else
|
|
echo " [WARN] templates/module-template/ no existe"
|
|
((WARNINGS++))
|
|
fi
|
|
|
|
# Resumen
|
|
echo ""
|
|
echo "============================================"
|
|
echo " RESUMEN DE VALIDACION"
|
|
echo "============================================"
|
|
echo " Errores: $ERRORS"
|
|
echo " Advertencias: $WARNINGS"
|
|
echo ""
|
|
|
|
if [ $ERRORS -eq 0 ]; then
|
|
echo " [PASS] Knowledge Base VALIDO"
|
|
exit 0
|
|
else
|
|
echo " [FAIL] Knowledge Base tiene errores"
|
|
exit 1
|
|
fi
|