workspace-v1/orchestration/referencias/REPOSITORY-STRUCTURE.md
rckrdmrd ff3038f183 feat(orchestration): Add subagent token management system
Sistema completo de gestión de tokens para subagentes NEXUS v4.0:

Nuevas directivas SIMCO:
- SIMCO-SUBAGENTE.md: Protocolo para agentes en modo subagente
- SIMCO-CCA-SUBAGENTE.md: CCA ligero para subagentes (~1,500 tokens)
- SIMCO-CONTROL-TOKENS.md: Gestión de límites de tokens
- SIMCO-DELEGACION-PARALELA.md: Delegación paralela

Perfiles compact (~250 tokens cada uno):
- PERFIL-BACKEND-COMPACT.md
- PERFIL-FRONTEND-COMPACT.md
- PERFIL-DATABASE-COMPACT.md
- PERFIL-DEVOPS-COMPACT.md
- PERFIL-ML-COMPACT.md
- PERFIL-GENERIC-SUBAGENT.md

Templates de delegación escalonados:
- TEMPLATE-DELEGACION-MINIMA.md (~250 tokens)
- TEMPLATE-DELEGACION-ESTANDAR.md (~600 tokens)
- TEMPLATE-DELEGACION-COMPLETA.md (~1,800 tokens)

Nuevos perfiles especializados:
- PERFIL-MCP-ARCHITECT.md
- PERFIL-MCP-DEVELOPER.md
- PERFIL-RAG-ENGINEER.md
- PERFIL-CICD-SPECIALIST.md
- PERFIL-PRODUCTION-MANAGER.md
- PERFIL-MONITORING-AGENT.md
- PERFIL-SECRETS-MANAGER.md
- PERFIL-PROPAGATION-TRACKER.md

Checklists y documentación:
- CHECKLIST-PRE-DELEGACION.md
- Análisis y planes de implementación

Métricas de mejora:
- ~59% reducción de tokens por delegación
- Perfiles compact: 69% más ligeros
- CCA subagente: 85% más ligero

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:43:01 -06:00

201 lines
4.5 KiB
Markdown

# Estructura de Repositorios - Workspace-v1
**Version:** 1.0.0
**Fecha:** 2026-01-04
**Sistema:** NEXUS v3.4
**EPIC:** EPIC-010
---
## 1. Vision General
```
workspace-v1/ # Repositorio principal (Gitea)
├── .git/
├── .gitignore
├── .gitmodules # Define submodule gamilit
├── core/ # Sistema SIMCO y catalogo
├── shared/ # Recursos compartidos
├── orchestration/ # Orquestacion de agentes
├── devtools/ # Herramientas de desarrollo
├── control-plane/ # Control de servicios
└── projects/
├── gamilit/ # SUBMODULE -> GitHub
├── trading-platform/
├── erp-suite/
└── ...
```
---
## 2. Repositorios Remotos
### Gitea (Principal)
| Campo | Valor |
|-------|-------|
| URL Web | http://72.60.226.4:3000 |
| Usuario | rckrdmrd |
| URL SSH | git@gitea-server:rckrdmrd/workspace-v1.git |
### GitHub (gamilit)
| Campo | Valor |
|-------|-------|
| Usuario | rckrdmrd |
| Repositorio | gamilit-workspace |
| URL SSH | git@github.com:rckrdmrd/gamilit-workspace.git |
---
## 3. Submodules
### gamilit
- **Path:** projects/gamilit
- **URL:** git@github.com:rckrdmrd/gamilit-workspace.git
- **Branch:** main
- **Razon:** Servidor productivo separado
---
## 4. Estrategia de Branches
| Branch | Proposito |
|--------|-----------|
| main | Produccion estable |
| develop | Integracion |
| feature/* | Desarrollo |
| hotfix/* | Fixes urgentes |
---
## 5. Scripts de Gestion
### clone-workspace.sh
```bash
./devtools/scripts/git/clone-workspace.sh
```
### sync-submodules.sh
```bash
./devtools/scripts/git/sync-submodules.sh [--commit]
```
---
## 6. Comandos Comunes
### Clonar
```bash
git clone --recurse-submodules git@gitea-server:rckrdmrd/workspace-v1.git
```
### Nueva feature
```bash
git checkout develop
git checkout -b feature/EPIC-XXX-desc
```
### Actualizar submodule
```bash
git submodule update --remote projects/gamilit
```
---
## 7. SSH Config
```
Host gitea-server
HostName 72.60.226.4
User git
IdentityFile ~/.ssh/id_ed25519
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
```
---
## 8. MCP Servers (Repositorios Independientes)
Los MCP servers son proyectos con repositorios independientes que se clonan
**despues** de clonar workspace-v1. No son submodules para permitir desarrollo
independiente y flexibilidad.
### Estructura
```
core/mcp-servers/
├── README.md # SE VERSIONA con workspace
├── _registry.yml # SE VERSIONA - lista de MCP
├── internal/
│ ├── .gitkeep # SE VERSIONA
│ ├── rag-knowledge/ # REPO INDEPENDIENTE - se clona
│ └── scrum-taiga/ # REPO INDEPENDIENTE - se clona
├── external/ # SE VERSIONA
└── templates/ # SE VERSIONA
```
### Clonacion de MCP Servers
```bash
# 1. Despues de clonar workspace-v1
cd /home/isem/workspace-v1/core/mcp-servers/internal
# 2. Clonar RAG Knowledge Base (recomendado)
git clone git@gitea-server:rckrdmrd/mcp-rag-knowledge.git rag-knowledge
cd rag-knowledge && npm install && cd ..
# 3. Clonar SCRUM Taiga (opcional)
git clone git@gitea-server:rckrdmrd/mcp-scrum-taiga.git scrum-taiga
cd scrum-taiga && npm install && cd ..
```
### MCP Servers Disponibles
| MCP Server | Repositorio | Prioridad |
|------------|-------------|-----------|
| rag-knowledge | mcp-rag-knowledge.git | MAXIMA |
| scrum-taiga | mcp-scrum-taiga.git | ALTA |
### Por que NO son submodules?
1. **Flexibilidad:** Actualizacion independiente del workspace
2. **Desarrollo:** Ciclos de vida propios
3. **Reutilizacion:** Pueden usarse en otros contextos
4. **Simplicidad:** Sin complejidad de submodules anidados
Ver `core/mcp-servers/_registry.yml` para lista completa e instrucciones.
---
## 9. Flujo Completo de Clonacion
```bash
# 1. Clonar workspace principal con submodules
git clone --recurse-submodules git@gitea-server:rckrdmrd/workspace-v1.git
cd workspace-v1
# 2. Verificar submodule gamilit
git submodule status
# 3. Clonar MCP servers necesarios
cd core/mcp-servers/internal
git clone git@gitea-server:rckrdmrd/mcp-rag-knowledge.git rag-knowledge
# 4. Instalar dependencias de MCP
cd rag-knowledge && npm install
# 5. Volver al workspace
cd /home/isem/workspace-v1
# 6. Verificar estructura
ls -la core/mcp-servers/internal/
```
---
**Generado:** 2026-01-04
**Actualizado:** 2026-01-04 (EPIC-013)