workspace-v1/orchestration/templates/_MAP.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

241 lines
12 KiB
Markdown

# Mapa de Templates - Sistema NEXUS
**Version:** 2.1.0
**Fecha:** 2026-01-03
**Total Templates:** 24
---
## Estructura de Archivos
```
templates/
|
+-- _MAP.md <- ESTAS AQUI
|
+-- # TEMPLATES CAPVED (Ciclo de Vida)
+-- TEMPLATE-TAREA-CAPVED.md # Tracking completo de HU con ciclo CAPVED
+-- TEMPLATE-ANALISIS.md # Fase A - Analisis pre-ejecucion
+-- TEMPLATE-PLAN.md # Fase P - Plan de ejecucion
+-- TEMPLATE-VALIDACION.md # Fase V - Validacion post-ejecucion
|
+-- # TEMPLATES DE PLANIFICACION
+-- TEMPLATE-HISTORIA-USUARIO.md # Definicion de User Stories
+-- TEMPLATE-EPICA.md # Definicion de Epicas
+-- TEMPLATE-TAREA-TECNICA.md # Tareas atomicas por capa
|
+-- # TEMPLATES DE CONTEXTO POR NIVEL
+-- CONTEXTO-NIVEL-STANDALONE.md # Proyectos independientes (Nivel 2A)
+-- CONTEXTO-NIVEL-SUITE.md # Suites multi-vertical (Nivel 2B)
+-- CONTEXTO-NIVEL-SUITE-CORE.md # Core de suite (Nivel 2B.1)
+-- CONTEXTO-NIVEL-VERTICAL.md # Verticales (Nivel 2B.2)
|
+-- # TEMPLATES DE DELEGACION
+-- TEMPLATE-DELEGACION-SUBAGENTE.md # Delegar tareas a subagentes
+-- TEMPLATE-CONTEXTO-SUBAGENTE.md # Contexto minimo para subagentes
+-- TEMPLATE-CONTEXTO-PROYECTO.md # Contexto de proyecto
+-- TEMPLATES-SUBAGENTES.md # Catalogo de prompts subagentes
|
+-- # TEMPLATES DE HERENCIA
+-- HERENCIA-SIMCO.md # Configurar herencia de directivas
+-- HERENCIA-ERP-CORE-TEMPLATE.md # Herencia para verticales ERP
+-- CONTEXTO-VERTICAL-TEMPLATE.md # Contexto especifico vertical ERP
|
+-- # TEMPLATES NUEVOS (EPIC-003)
+-- TEMPLATE-MODULO-COMPARTIDO.md # [NUEVO] Documentar modulos shared/modules/
+-- TEMPLATE-ESTRUCTURA-VERTICAL.md # [NUEVO] Crear nuevos verticales
|
+-- # OTROS TEMPLATES
+-- TEMPLATE-ANALISIS-IMPACTO.md # Analisis de impacto cross-capa
+-- TEMPLATE-HU-DERIVADA.md # HUs detectadas durante ejecucion
+-- TEMPLATE-REPORTE-SPRINT.md # Reporte de cierre de sprint
+-- CHECKLIST-ESTRUCTURA-PROYECTO.md # Validar estructura minima
+-- SERVICE-DESCRIPTOR-TEMPLATE.yml # Descriptor de servicios
```
---
## Guia de Seleccion Rapida
### Por Tipo de Trabajo
| Situacion | Template | Alias |
|-----------|----------|-------|
| Iniciar tracking de HU completa | TEMPLATE-TAREA-CAPVED.md | @TPL_CAPVED |
| Analizar impacto antes de planificar | TEMPLATE-ANALISIS.md | @TPL_ANALISIS |
| Crear plan de ejecucion | TEMPLATE-PLAN.md | @TPL_PLAN |
| Validar trabajo ejecutado | TEMPLATE-VALIDACION.md | @TPL_VALIDACION |
| Definir nueva user story | TEMPLATE-HISTORIA-USUARIO.md | @TPL_HU |
| Definir nueva epica | TEMPLATE-EPICA.md | @TPL_EPICA |
| Desglosar HU en tareas tecnicas | TEMPLATE-TAREA-TECNICA.md | @TPL_TECNICA |
### Por Nivel de Proyecto
| Nivel | Template | Alias |
|-------|----------|-------|
| Proyecto standalone | CONTEXTO-NIVEL-STANDALONE.md | @TPL_STANDALONE |
| Suite multi-vertical | CONTEXTO-NIVEL-SUITE.md | @TPL_SUITE |
| Core de suite | CONTEXTO-NIVEL-SUITE-CORE.md | @TPL_SUITE_CORE |
| Vertical de suite | CONTEXTO-NIVEL-VERTICAL.md | @TPL_VERTICAL |
### Para Delegacion
| Situacion | Template | Alias |
|-----------|----------|-------|
| Delegar trabajo a subagente | TEMPLATE-DELEGACION-SUBAGENTE.md | @TPL_DELEGACION |
| Definir contexto minimo subagente | TEMPLATE-CONTEXTO-SUBAGENTE.md | @TPL_SUBAGENTE |
| Crear CONTEXTO-PROYECTO.md | TEMPLATE-CONTEXTO-PROYECTO.md | @TPL_CONTEXTO |
### Para Modulos y Estructura (NUEVOS)
| Situacion | Template | Alias |
|-----------|----------|-------|
| Documentar modulo en shared/modules/ | TEMPLATE-MODULO-COMPARTIDO.md | @TPL_MODULO |
| Crear nuevo vertical | TEMPLATE-ESTRUCTURA-VERTICAL.md | @TPL_ESTRUCTURA_VERTICAL |
### Para Herencia
| Situacion | Template | Alias |
|-----------|----------|-------|
| Configurar herencia SIMCO | HERENCIA-SIMCO.md | - |
| Proyecto que extiende ERP-Core | HERENCIA-ERP-CORE-TEMPLATE.md | - |
| Contexto de vertical ERP | CONTEXTO-VERTICAL-TEMPLATE.md | - |
---
## Integracion con Catalogo
### Templates con Verificacion de Catalogo
Los siguientes templates incluyen seccion de verificacion de @CATALOG_INDEX:
- TEMPLATE-TAREA-CAPVED.md (Fase C)
- TEMPLATE-PLAN.md (Verificacion obligatoria)
- TEMPLATE-HISTORIA-USUARIO.md (Antes de crear)
- TEMPLATE-EPICA.md (Verificar funcionalidades)
- TEMPLATE-TAREA-TECNICA.md (Antes de crear)
- TEMPLATE-DELEGACION-SUBAGENTE.md (Bloque 3)
### Como Usar con Catalogo
1. Antes de implementar, verificar catalogo:
```bash
grep -i "{funcionalidad}" shared/catalog/CATALOG-INDEX.yml
```
2. Si existe en catalogo:
- Seguir SIMCO-REUTILIZAR.md
- Copiar de shared/catalog/{funcionalidad}/_reference/
3. Si NO existe:
- Proceder con implementacion nueva
- Considerar contribuir despues (SIMCO-CONTRIBUIR-CATALOGO.md)
---
## Templates por Fase CAPVED
```
╔══════════════════════════════════════════════════════════════════════╗
║ FASE C - CONTEXTO ║
╠══════════════════════════════════════════════════════════════════════╣
║ TEMPLATE-TAREA-CAPVED.md (seccion Contexto) ║
║ CONTEXTO-NIVEL-*.md (por tipo de proyecto) ║
║ TEMPLATE-CONTEXTO-PROYECTO.md ║
╚══════════════════════════════════════════════════════════════════════╝
╔══════════════════════════════════════════════════════════════════════╗
║ FASE A - ANALISIS ║
╠══════════════════════════════════════════════════════════════════════╣
║ TEMPLATE-ANALISIS.md ║
║ TEMPLATE-ANALISIS-IMPACTO.md ║
╚══════════════════════════════════════════════════════════════════════╝
╔══════════════════════════════════════════════════════════════════════╗
║ FASE P - PLANEACION ║
╠══════════════════════════════════════════════════════════════════════╣
║ TEMPLATE-PLAN.md ║
║ TEMPLATE-HISTORIA-USUARIO.md ║
║ TEMPLATE-EPICA.md ║
║ TEMPLATE-TAREA-TECNICA.md ║
╚══════════════════════════════════════════════════════════════════════╝
╔══════════════════════════════════════════════════════════════════════╗
║ FASE V - VALIDACION ║
╠══════════════════════════════════════════════════════════════════════╣
║ TEMPLATE-VALIDACION.md ║
║ CHECKLIST-ESTRUCTURA-PROYECTO.md ║
╚══════════════════════════════════════════════════════════════════════╝
╔══════════════════════════════════════════════════════════════════════╗
║ FASE E - EJECUCION ║
╠══════════════════════════════════════════════════════════════════════╣
║ TEMPLATE-DELEGACION-SUBAGENTE.md ║
║ TEMPLATE-CONTEXTO-SUBAGENTE.md ║
║ TEMPLATES-SUBAGENTES.md ║
╚══════════════════════════════════════════════════════════════════════╝
╔══════════════════════════════════════════════════════════════════════╗
║ FASE D - DOCUMENTACION ║
╠══════════════════════════════════════════════════════════════════════╣
║ TEMPLATE-HU-DERIVADA.md ║
║ TEMPLATE-REPORTE-SPRINT.md ║
║ TEMPLATE-MODULO-COMPARTIDO.md [NUEVO] ║
╚══════════════════════════════════════════════════════════════════════╝
```
---
## Campos Comunes
### Identificacion (todos los templates)
| Campo | Descripcion |
|-------|-------------|
| ID | Identificador unico (HU-XXX, DB-XXX, etc.) |
| Proyecto/Modulo | Contexto del proyecto |
| Prioridad | P0/P1/P2/P3 |
| Estado | Pendiente/En_progreso/Completado |
| Fecha | Fecha de creacion/modificacion |
### Verificacion de Catalogo
| Campo | Descripcion |
|-------|-------------|
| Verificacion @CATALOG | Obligatorio antes de implementar |
| Funcionalidades a verificar | auth, session, rate-limit, etc. |
### Criterios y Validaciones
| Campo | Descripcion |
|-------|-------------|
| Criterios de Aceptacion | Funcionales y tecnicos |
| Definition of Done | Checklist de completitud |
| Validaciones obligatorias | build, lint, tests |
---
## Novedades v2.1.0
### Templates Nuevos
1. **TEMPLATE-MODULO-COMPARTIDO.md** - Para documentar modulos en shared/modules/
2. **TEMPLATE-ESTRUCTURA-VERTICAL.md** - Para crear nuevos verticales en suites
### Aliases Nuevos
- `@TPL_MODULO` - TEMPLATE-MODULO-COMPARTIDO.md
- `@TPL_ESTRUCTURA_VERTICAL` - TEMPLATE-ESTRUCTURA-VERTICAL.md
---
## Referencias
- **Directivas SIMCO:** `directivas/simco/_INDEX.md`
- **Aliases:** `referencias/ALIASES.yml`
- **Catalogo:** `shared/catalog/CATALOG-INDEX.yml`
---
**Mapa Version:** 2.1.0 | **Sistema:** SIMCO | **Total Templates:** 24