Comprehensive analysis of 101 DDL tables across 11 schemas: - Phase 1-2: Schema validation, 37 gaps cataloged (3 resolved) - Phase 3: Integrity audit (80 FKs, 89 CHECKs, 17 issues: 2 CRIT/5 HIGH) - Phase 4: DDL-Backend mapping (84% interfaces, 75% services, 61% controllers) - Phase 5: Documentation purge catalog (201 files analyzed) - Phase 6: Remediation plan (4 sprints, 204h) Key finding: Backend uses raw SQL + pg Pool (NOT TypeORM). 13 deliverables + updated inventories to v2.0.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
193 lines
5.2 KiB
YAML
193 lines
5.2 KiB
YAML
perfiles_subagentes:
|
|
version: 1.0.0
|
|
fecha: "2026-02-04"
|
|
proyecto: trading-platform
|
|
|
|
asignaciones:
|
|
fase_0_preparacion:
|
|
perfil_principal: PERFIL-ORQUESTADOR
|
|
responsabilidades:
|
|
- Purga de documentación
|
|
- Sincronización de inventarios
|
|
- Actualización de status
|
|
tokens_estimados: 30000
|
|
subtareas: [ST-0.1, ST-0.2, ST-0.3]
|
|
|
|
fase_1_ddl:
|
|
perfil_principal: PERFIL-DATABASE-POSTGRESQL
|
|
perfil_compact: PERFIL-DATABASE-COMPACT
|
|
responsabilidades:
|
|
- Crear tablas DDL
|
|
- Definir enums
|
|
- Crear índices
|
|
- Validar FK
|
|
tokens_estimados: 40000
|
|
subtareas: [ST-1.1, ST-1.2, ST-1.3, ST-1.4]
|
|
comandos_wsl:
|
|
recreate_db: |
|
|
wsl -d Ubuntu-24.04 -u developer -- bash '/mnt/c/Empresas/ISEM/workspace-v2/scripts/database/unified-recreate-db.sh' trading-platform --drop
|
|
validate_ddl: |
|
|
wsl -d Ubuntu-24.04 -u developer -- psql -U trading_user -d trading_platform -c "\dt education.*"
|
|
|
|
fase_2_backend_services:
|
|
perfil_principal: PERFIL-BACKEND-NESTJS
|
|
perfil_compact: PERFIL-BACKEND-COMPACT
|
|
responsabilidades:
|
|
- Crear services TypeScript
|
|
- Implementar lógica de negocio
|
|
- Integrar con DB
|
|
- Cache Redis
|
|
tokens_estimados: 80000
|
|
subtareas: [ST-2.1, ST-2.2, ST-2.3, ST-2.4, ST-2.5]
|
|
estructura_modulo: |
|
|
modules/{module-name}/
|
|
├── {module-name}.module.ts
|
|
├── {module-name}.controller.ts
|
|
├── {module-name}.service.ts
|
|
├── interfaces/
|
|
├── dto/
|
|
└── index.ts
|
|
|
|
fase_3_backend_api:
|
|
perfil_principal: PERFIL-BACKEND-NESTJS
|
|
responsabilidades:
|
|
- Crear controllers
|
|
- Definir endpoints
|
|
- Implementar guards
|
|
- Documentar Swagger
|
|
tokens_estimados: 50000
|
|
subtareas: [ST-3.1, ST-3.2, ST-3.3, ST-3.4, ST-3.5]
|
|
|
|
fase_4_frontend:
|
|
perfil_principal: PERFIL-FRONTEND-REACT
|
|
perfil_compact: PERFIL-GENERIC-SUBAGENT
|
|
perfiles_especializados:
|
|
- PERFIL-ML-SPECIALIST (para SUBTASK-004)
|
|
- PERFIL-TRADING-STRATEGIST (para SUBTASK-003)
|
|
responsabilidades:
|
|
- Crear componentes React
|
|
- Implementar páginas
|
|
- Conectar con API
|
|
- State management
|
|
tokens_estimados: 150000
|
|
subtareas:
|
|
- SUBTASK-001 a SUBTASK-012
|
|
estructura_componente: |
|
|
components/{ComponentName}/
|
|
├── {ComponentName}.tsx
|
|
├── {ComponentName}.styles.ts (o .css)
|
|
├── {ComponentName}.test.tsx
|
|
└── index.ts
|
|
|
|
fase_5_architecture:
|
|
perfil_principal: PERFIL-BACKEND-NESTJS
|
|
responsabilidades:
|
|
- Refactorizar proxy
|
|
- Unificar apiClient
|
|
- Resolver ARCH-001/002
|
|
tokens_estimados: 40000
|
|
subtareas: [ST-5.1, ST-5.2]
|
|
|
|
fase_6_testing:
|
|
perfil_principal: PERFIL-QA-TESTER
|
|
perfil_backup: PERFIL-BACKEND-NESTJS
|
|
responsabilidades:
|
|
- Unit tests
|
|
- Integration tests
|
|
- E2E tests
|
|
- Coverage reports
|
|
tokens_estimados: 60000
|
|
subtareas: [ST-6.1, ST-6.2, ST-6.3, ST-6.4]
|
|
|
|
fase_7_documentacion:
|
|
perfil_principal: PERFIL-DOCUMENTACION
|
|
perfil_backup: PERFIL-ORQUESTADOR
|
|
responsabilidades:
|
|
- Guías de desarrollo
|
|
- API docs
|
|
- Inventarios finales
|
|
tokens_estimados: 30000
|
|
subtareas: [ST-7.1, ST-7.2, ST-7.3]
|
|
|
|
mapeo_rapido:
|
|
crear_tabla_ddl: PERFIL-DATABASE-POSTGRESQL
|
|
crear_service_ts: PERFIL-BACKEND-NESTJS
|
|
crear_controller_ts: PERFIL-BACKEND-NESTJS
|
|
crear_componente_react: PERFIL-FRONTEND-REACT
|
|
crear_pagina_react: PERFIL-FRONTEND-REACT
|
|
crear_test: PERFIL-QA-TESTER
|
|
crear_documentacion: PERFIL-DOCUMENTACION
|
|
sincronizar_inventario: PERFIL-ORQUESTADOR
|
|
validar_coherencia: PERFIL-ORQUESTADOR
|
|
|
|
reglas_delegacion:
|
|
- Usar perfil compact cuando subtarea es < 50 líneas
|
|
- Paralelizar cuando no hay dependencias
|
|
- Validar build después de cada subtarea backend
|
|
- Validar lint después de cada subtarea frontend
|
|
- Incluir herencia de contexto siempre
|
|
- Máximo 5 archivos por subtarea
|
|
- Máximo 500 líneas por archivo
|
|
|
|
coordinacion_paralela:
|
|
fase_0:
|
|
max_parallel: 3
|
|
subtareas_paralelas: [ST-0.1, ST-0.2, ST-0.3]
|
|
|
|
fase_1:
|
|
max_parallel: 3
|
|
subtareas_paralelas: [ST-1.1, ST-1.2, ST-1.3]
|
|
secuencial_final: ST-1.4
|
|
|
|
fase_2:
|
|
max_parallel: 2
|
|
grupos:
|
|
- [ST-2.1] # Crítico, secuencial
|
|
- [ST-2.2, ST-2.3] # Paralelo
|
|
- [ST-2.4, ST-2.5] # Paralelo
|
|
|
|
fase_3:
|
|
max_parallel: 3
|
|
subtareas_paralelas: [ST-3.1, ST-3.2, ST-3.3, ST-3.4, ST-3.5]
|
|
|
|
fase_4:
|
|
max_parallel: 2
|
|
por_sprint: true
|
|
sprints:
|
|
FE-1: [SUBTASK-001, SUBTASK-002]
|
|
FE-2: [SUBTASK-003, SUBTASK-004]
|
|
FE-3: [SUBTASK-005, SUBTASK-006]
|
|
FE-4: [SUBTASK-007, SUBTASK-008, SUBTASK-009]
|
|
FE-5: [SUBTASK-010, SUBTASK-011, SUBTASK-012]
|
|
|
|
fase_5:
|
|
max_parallel: 1
|
|
secuencial: true
|
|
|
|
fase_6:
|
|
max_parallel: 2
|
|
grupos:
|
|
- [ST-6.1, ST-6.2]
|
|
- [ST-6.3]
|
|
- [ST-6.4]
|
|
|
|
fase_7:
|
|
max_parallel: 3
|
|
subtareas_paralelas: [ST-7.1, ST-7.2, ST-7.3]
|
|
|
|
economia_tokens:
|
|
total_estimado: 480000
|
|
por_fase:
|
|
FASE_0: 30000
|
|
FASE_1: 40000
|
|
FASE_2: 80000
|
|
FASE_3: 50000
|
|
FASE_4: 150000
|
|
FASE_5: 40000
|
|
FASE_6: 60000
|
|
FASE_7: 30000
|
|
optimizaciones:
|
|
- Usar perfiles compact (ahorro 50%)
|
|
- Reutilizar contexto entre subtareas
|
|
- No re-leer archivos ya analizados
|