workspace-v1/02-fase-core-orchestration/README.md
Adrian Flores Cortes 967ab360bb Initial commit: Workspace v1 with 3-layer architecture
Structure:
- control-plane/: Registries, SIMCO directives, CI/CD templates
- projects/: Gamilit, ERP-Suite, Trading-Platform, Betting-Analytics
- shared/: Libs catalog, knowledge-base

Key features:
- Centralized port, domain, database, and service registries
- 23 SIMCO directives + 6 fundamental principles
- NEXUS agent profiles with delegation rules
- Validation scripts for workspace integrity
- Dockerfiles for all services
- Path aliases for quick reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:35:19 -06:00

225 lines
5.4 KiB
Markdown

# FASE 2: CORE ORCHESTRATION
**Estado:** Pendiente
**Duracion Estimada:** 3-5 dias
**Agente Principal:** Tech-Leader
**Dependencias:** Fase 1 (Control Plane completado)
---
## OBJETIVO
Migrar y actualizar el sistema de orquestacion (SIMCO + NEXUS) al nuevo Control Plane, incorporando las mejoras identificadas:
1. Actualizacion de perfiles de agentes con registro awareness
2. Creacion del Service Descriptor Standard
3. Integracion con registries
4. Nuevas directivas SIMCO para la arquitectura v1
---
## ALCANCE
### Incluye
- Migracion de directivas SIMCO existentes
- Actualizacion de perfiles de agentes (12+)
- Creacion de SIMCO-DEVOPS con enforcement de registries
- Definicion del Service Descriptor Standard
- Templates actualizados para CAPVED
### No Incluye
- Contenido de registries (ya hecho en Fase 1)
- Migracion de proyectos (Fase 4)
- Shared libs (Fase 5)
---
## COMPONENTES A MIGRAR/ACTUALIZAR
### 2.1 Directivas SIMCO (Migrar + Actualizar)
```
DEL WORKSPACE ACTUAL:
core/orchestration/directivas/simco/
+-- SIMCO-INICIALIZACION.md -> Migrar + Actualizar (agregar registry check)
+-- SIMCO-CREAR.md -> Migrar + Actualizar
+-- SIMCO-MODIFICAR.md -> Migrar
+-- SIMCO-VALIDAR.md -> Migrar + Actualizar (agregar registry validation)
+-- SIMCO-BUSCAR.md -> Migrar
+-- SIMCO-DOCUMENTAR.md -> Migrar
+-- SIMCO-DELEGACION.md -> Migrar + Actualizar
+-- SIMCO-BACKEND.md -> Migrar + Actualizar (service descriptor)
+-- SIMCO-FRONTEND.md -> Migrar
+-- SIMCO-DDL.md -> Migrar + Actualizar (database registry)
+-- SIMCO-NIVELES.md -> Actualizar (nueva estructura de repos)
+-- SIMCO-PROPAGACION.md -> Actualizar
NUEVAS DIRECTIVAS:
+-- SIMCO-DEVOPS.md -> CREAR (enforcement de registries)
+-- SIMCO-SERVICE-DESCRIPTOR.md -> CREAR (standard de descriptores)
```
### 2.2 Perfiles de Agentes (Migrar + Actualizar)
```
ACTUALIZACIONES REQUERIDAS:
PERFIL-BACKEND.md:
- Agregar: Verificar ports.registry antes de exponer puertos
- Agregar: Crear/actualizar service.descriptor.yml
- Agregar: Verificar databases.registry para conexiones
PERFIL-FRONTEND.md:
- Agregar: Verificar domains.registry para URLs
- Agregar: Referenciar service.descriptor.yml del backend
PERFIL-DATABASE.md:
- Agregar: Verificar databases.registry antes de crear BD
- Agregar: Seguir convencion de roles (owner, runtime, migrator)
- Agregar: Documentar en databases.registry nuevas BDs
PERFIL-DEVOPS.md (NUEVO):
- Responsable de registries
- Ejecuta validaciones
- Configura CI/CD
PERFIL-WORKSPACE-MANAGER.md:
- Actualizar para nueva estructura de repos
- Agregar validacion de manifests
```
### 2.3 Principios (Migrar)
```
core/orchestration/directivas/principios/
+-- PRINCIPIO-CAPVED.md -> Migrar (sin cambios)
+-- PRINCIPIO-DOC-PRIMERO.md -> Migrar (sin cambios)
+-- PRINCIPIO-ANTI-DUPLICACION.md -> Migrar (sin cambios)
+-- PRINCIPIO-VALIDACION-OBLIGATORIA.md -> Migrar + Actualizar (agregar registry validation)
+-- PRINCIPIO-ECONOMIA-TOKENS.md -> Migrar (sin cambios)
```
### 2.4 Service Descriptor Standard (NUEVO)
```yaml
# Nuevo estandar: service.descriptor.yml
# Cada servicio en cada repo de producto debe tener este archivo
service:
name: "nombre-servicio"
type: "backend | frontend | database | ml | worker"
runtime: "node | python | go | static"
owner_agent: "NEXUS-BACKEND | NEXUS-FRONTEND | etc"
repository:
name: "nombre-repo"
path: "ruta/relativa/al/servicio"
ports:
internal: 3000
registry_ref: "projects.gamilit.api" # Referencia a ports.registry
domains:
registry_ref: "gamilit" # Referencia a domains.registry
database:
registry_ref: "gamilit" # Referencia a databases.registry
environments:
- dev
- staging
- prod
healthcheck:
path: "/health"
interval: "30s"
dependencies:
services: []
databases: ["gamilit_db"]
ci:
pipeline: "node-backend-standard"
tests: true
lint: true
build: true
```
---
## SUBFASES
### 2.1 Migracion de SIMCO Base
- Copiar directivas existentes
- Actualizar rutas y referencias
- Ajustar para nueva estructura
### 2.2 Actualizacion de Perfiles
- Actualizar cada perfil con registry awareness
- Crear PERFIL-DEVOPS.md
- Actualizar ALIASES.yml
### 2.3 Creacion de Nuevas Directivas
- SIMCO-DEVOPS.md
- SIMCO-SERVICE-DESCRIPTOR.md
### 2.4 Service Descriptor Standard
- Definir schema
- Crear template
- Documentar uso
---
## DOCUMENTOS DE ESTA FASE
```
02-fase-core-orchestration/
|
+-- README.md # Este archivo
|
+-- ANALISIS/
| +-- 00-PLAN-ANALISIS.md
| +-- 01-INVENTARIO-SIMCO.md # Lista de directivas a migrar
| +-- 02-INVENTARIO-PERFILES.md # Lista de perfiles a migrar
| +-- 03-GAPS-IDENTIFICADOS.md # Lo que falta crear
|
+-- PLANEACION/
| +-- 00-TAREAS.md
| +-- 01-ORDEN-MIGRACION.md
| +-- 02-CAMBIOS-POR-ARCHIVO.md
|
+-- IMPLEMENTACION/
| +-- 00-EJECUCION.md
| +-- 01-LOG-MIGRACION.md
|
+-- PROMPTS/
| +-- PROMPT-TECH-LEADER.md
| +-- PROMPT-DOCUMENTATION-VALIDATOR.md
|
+-- VALIDACION/
| +-- CHECKLIST.md
| +-- REPORTE.md
|
+-- ARTEFACTOS/
+-- SERVICE-DESCRIPTOR-SCHEMA.yml
+-- SERVICE-DESCRIPTOR-TEMPLATE.yml
```
---
## SIGUIENTE PASO
1. Completar Fase 1
2. Leer `ANALISIS/00-PLAN-ANALISIS.md`
3. Ejecutar inventario de SIMCO actual
---
**Agente Responsable:** Tech-Leader