- Created TASK-2026-01-26-ANALYSIS-INTEGRATION-PLAN with complete CAPVED documentation - Orchestrated 5 specialized Explore agents in parallel (85% time reduction) - Identified 7 coherence gaps (DDL↔Backend↔Frontend) - Identified 4 P0 blockers preventing GO-LIVE - Documented 58 missing documentation items - Created detailed roadmap Q1-Q4 2026 (2,500h total) - Added 6 new ET specs for ML strategies (PVA, MRD, VBP, MSA, MTS, Backtesting) - Updated _INDEX.yml with new analysis task Hallazgos críticos: - E-COH-001 to E-COH-007: Coherence gaps (6.5h to fix) - BLOCKER-001 to 004: Token refresh, PCI-DSS, Video upload, MT4 Gateway (380h) - Documentation gaps: 8 ET specs, 8 US, 34 Swagger docs (47.5h) Roadmap phases: - Q1: Security & Blockers (249h) - Q2: Core Features + GO-LIVE (542h) - Q3: Scalability & Performance (380h) - Q4: Innovation & Advanced Features (1,514h) ROI: $223k investment → $750k revenue → $468k net profit (165% ROI) Next: Execute ST1 (Coherencia Fixes P0) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
781 lines
25 KiB
Markdown
781 lines
25 KiB
Markdown
# PLAN - Integración y Roadmap Trading Platform
|
|
|
|
**Tarea:** TASK-2026-01-26-ANALYSIS-INTEGRATION-PLAN
|
|
**Fecha:** 2026-01-26
|
|
**Agente:** ARQUITECTO-SISTEMA-PLANIFICADOR (claude-sonnet-4-5)
|
|
**Fase CAPVED:** P - Plan
|
|
|
|
---
|
|
|
|
## RESUMEN DEL PLAN
|
|
|
|
Plan exhaustivo de integración y desarrollo para trading-platform, organizado en:
|
|
- **5 subtareas nivel 1** (estratégicas)
|
|
- **20+ subtareas nivel 2** (tácticas)
|
|
- **50+ subtareas nivel 3** (operacionales)
|
|
|
|
**Total esfuerzo:** ~2,500h (Q1-Q4 2026)
|
|
**Prioridad:** P0 blockers primero, luego features según roadmap
|
|
**Metodología:** CAPVED aplicado a TODAS las subtareas
|
|
|
|
---
|
|
|
|
## ESTRUCTURA DEL PLAN
|
|
|
|
```
|
|
NIVEL 1: Subtareas Estratégicas (5)
|
|
├── ST1: Coherencia Fixes P0 (6.5h)
|
|
├── ST2: Documentation Integration (47.5h)
|
|
├── ST3: Documentation Purge (8h)
|
|
├── ST4: Blockers P0 Resolution (380h)
|
|
└── ST5: Roadmap Q1-Q4 Execution (2,057h)
|
|
|
|
NIVEL 2: Subtareas Tácticas (20+)
|
|
└── Descomposición de cada ST1-ST5
|
|
|
|
NIVEL 3: Subtareas Operacionales (50+)
|
|
└── Tareas atómicas (<50 LOC, 1 archivo)
|
|
```
|
|
|
|
---
|
|
|
|
## NIVEL 1: SUBTAREAS ESTRATÉGICAS
|
|
|
|
### ST1: COHERENCIA FIXES P0 (6.5h)
|
|
|
|
**ID:** TASK-2026-01-27-COHERENCIA-FIXES-P0
|
|
**Prioridad:** P0 - CRÍTICO
|
|
**Descripción:** Resolver 7 gaps de coherencia DDL↔Backend↔Frontend
|
|
**Bloqueada por:** Esta tarea (análisis debe completarse primero)
|
|
**Bloquea:** Todas las features nuevas (código sin coherencia genera bugs)
|
|
**Esfuerzo:** 6.5h
|
|
**Épicas:** OQI-001, 002, 003, 004, 005, 007
|
|
|
|
**Subtareas Nivel 2:**
|
|
|
|
| ST1.1 | E-COH-001: Fix Backend UserRole enum | 15min | P0 |
|
|
| ST1.2 | E-COH-003: Create investment.types.ts backend | 30min | P0 |
|
|
| ST1.3 | E-COH-004: Create portfolio.types.ts (backend+frontend) | 2h | P0 |
|
|
| ST1.4 | E-COH-002: Add trading enums to frontend | 45min | P1 |
|
|
| ST1.5 | E-COH-005: Create education.types.ts backend | 45min | P1 |
|
|
| ST1.6 | E-COH-006: Type JSONB fields in interfaces | 1.5h | P1 |
|
|
| ST1.7 | E-COH-007: Document endpoint routing | 1h | P2 |
|
|
|
|
**Metodología CAPVED:**
|
|
```yaml
|
|
C: Leer DDL schemas + Backend types + Frontend types
|
|
A: Identificar discrepancias exactas
|
|
P: Crear/actualizar archivos types
|
|
V: TypeScript typecheck + lint
|
|
E: Aplicar cambios, git commit
|
|
D: Actualizar COHERENCIA-REPORT.md
|
|
```
|
|
|
|
**Artefactos:**
|
|
- 4 archivos creados (investment.types.ts, portfolio.types.ts backend, education.types.ts)
|
|
- 5 archivos modificados (auth.types.ts, trading.types.ts, interfaces JSONB)
|
|
- 1 documento (COHERENCIA-REPORT.md)
|
|
|
|
**Validaciones:**
|
|
- ✅ TypeScript typecheck sin errores
|
|
- ✅ All enums match DDL exactly
|
|
- ✅ No hardcoded strings en componentes
|
|
- ✅ JSONB fields tipados como Record<string, unknown>
|
|
|
|
---
|
|
|
|
### ST2: DOCUMENTATION INTEGRATION (47.5h)
|
|
|
|
**ID:** TASK-2026-01-28-DOCUMENTATION-INTEGRATION
|
|
**Prioridad:** P1 - ALTA
|
|
**Descripción:** Integrar 58 items faltantes (ET specs, US, Swagger docs, READMEs)
|
|
**Bloqueada por:** ST1 (coherencia debe estar resuelta)
|
|
**Bloquea:** Ninguna (puede paralelizarse con ST4)
|
|
**Esfuerzo:** 47.5h
|
|
**Épicas:** ALL
|
|
|
|
**Subtareas Nivel 2:**
|
|
|
|
#### ST2.1: ET Specs Faltantes (23h)
|
|
|
|
| ID | Spec | Esfuerzo | Prioridad | Épica |
|
|
|----|------|----------|-----------|-------|
|
|
| ST2.1.1 | ET-EDU-007: VideoProgressPlayer Advanced | 4h | P1 | OQI-002 |
|
|
| ST2.1.2 | ET-ML-009: Ensemble Signal Multi-Strategy | 3h | P2 | OQI-006 |
|
|
| ST2.1.3 | ET-TRD-009: Risk-Based Position Sizer | 2h | P3 | OQI-003 |
|
|
| ST2.1.4 | ET-TRD-010: Drawing Tools Persistence | 3h | P1 | OQI-003 |
|
|
| ST2.1.5 | ET-TRD-011: Market Bias Indicator | 2h | P3 | OQI-003 |
|
|
| ST2.1.6 | ET-PFM-009: Custom Charts SVG/Canvas | 3h | P3 | OQI-008 |
|
|
| ST2.1.7 | ET-MT4-001: WebSocket Integration | 4h | P0 | OQI-009 |
|
|
| ST2.1.8 | ET-ML-008: ICT Analysis Card (expand) | 2h | P2 | OQI-006 |
|
|
|
|
**Metodología CAPVED (cada ET spec):**
|
|
```yaml
|
|
C: Leer código implementado + US relacionadas
|
|
A: Identificar features implementadas vs documentadas
|
|
P: Redactar especificación técnica (arquitectura, API, DB, frontend, seguridad)
|
|
V: Revisar con checklist ET-template
|
|
E: Crear archivo docs/02-definicion-modulos/OQI-XXX/especificaciones/ET-XXX-YYY.md
|
|
D: Actualizar OQI-XXX/_MAP.md + _INDEX.yml
|
|
```
|
|
|
|
#### ST2.2: User Stories Faltantes (8h)
|
|
|
|
| ID | US | Épica | Prioridad |
|
|
|----|-----|-------|-----------|
|
|
| ST2.2.1 | US-AUTH-013: Logout Global | OQI-001 | P2 |
|
|
| ST2.2.2 | US-AUTH-014: Gestión de Dispositivos | OQI-001 | P2 |
|
|
| ST2.2.3 | US-ML-008: Ver Ensemble Signal | OQI-006 | P2 |
|
|
| ST2.2.4 | US-ML-009: Ver ICT Analysis | OQI-006 | P2 |
|
|
| ST2.2.5 | US-ML-010: Scan Multi-símbolo | OQI-006 | P2 |
|
|
| ST2.2.6 | US-LLM-011: Ejecutar Trade desde Chat LLM | OQI-007 | P1 |
|
|
| ST2.2.7 | US-PFM-013: Alerta de Rebalanceo | OQI-008 | P3 |
|
|
| ST2.2.8 | US-PFM-014: Generar Reporte PDF | OQI-008 | P2 |
|
|
|
|
**Metodología CAPVED (cada US):**
|
|
```yaml
|
|
C: Leer especificación técnica correspondiente
|
|
A: Identificar user flow y criterios de aceptación
|
|
P: Redactar US siguiendo template (Como...Quiero...Para que...)
|
|
V: Validar criterios son medibles y testeables
|
|
E: Crear archivo docs/02-definicion-modulos/OQI-XXX/historias-usuario/US-XXX-YYY.md
|
|
D: Actualizar TRACEABILITY.yml
|
|
```
|
|
|
|
#### ST2.3: Swagger/OpenAPI Docs (8.5h)
|
|
|
|
**Descripción:** Generar documentación Swagger para 34 endpoints no documentados
|
|
|
|
**Endpoints por módulo:**
|
|
- auth: 5 endpoints
|
|
- trading: 12 endpoints
|
|
- investment: 8 endpoints
|
|
- education: 6 endpoints
|
|
- portfolio: 3 endpoints
|
|
|
|
**Metodología CAPVED:**
|
|
```yaml
|
|
C: Leer controllers + services
|
|
A: Extraer schemas request/response
|
|
P: Generar OpenAPI YAML specs
|
|
V: Validar con swagger-validator
|
|
E: Integrar en Swagger UI (backend/swagger.yml)
|
|
D: Actualizar API documentation index
|
|
```
|
|
|
|
#### ST2.4: Module READMEs (8h)
|
|
|
|
**Descripción:** Integrar 8 Module READMEs ya creados en TASK-FRONTEND-MODULE-DOCS
|
|
|
|
**Archivos existentes (mover desde orchestration/tareas/ a apps/):**
|
|
- auth/README.md (250 LOC) → apps/frontend/src/modules/auth/README.md
|
|
- trading/README.md (600 LOC) → apps/frontend/src/modules/trading/README.md
|
|
- payments/README.md (400 LOC) → apps/frontend/src/modules/payments/README.md
|
|
- investment/README.md (350 LOC) → apps/frontend/src/modules/investment/README.md
|
|
- education/README.md (450 LOC) → apps/frontend/src/modules/education/README.md
|
|
- assistant/README.md (400 LOC) → apps/frontend/src/modules/assistant/README.md
|
|
- portfolio/README.md (300 LOC) → apps/frontend/src/modules/portfolio/README.md
|
|
- ml/README.md (+100 LOC actualización) → apps/frontend/src/modules/ml/README.md
|
|
|
|
**Metodología CAPVED:**
|
|
```yaml
|
|
C: Verificar ubicación actual en orchestration/tareas/TASK-*/
|
|
A: Validar contenido está actualizado
|
|
P: Planear movimiento a apps/frontend/src/modules/{nombre}/
|
|
V: Verificar no hay conflictos
|
|
E: mv + git add + commit
|
|
D: Actualizar _INDEX.yml con nueva ubicación
|
|
```
|
|
|
|
---
|
|
|
|
### ST3: DOCUMENTATION PURGE (8h)
|
|
|
|
**ID:** TASK-2026-01-29-DOCUMENTATION-PURGE
|
|
**Prioridad:** P2 - MEDIA
|
|
**Descripción:** Purgar documentación obsoleta, organizar estructura docs/
|
|
**Bloqueada por:** ST2 (integración debe completarse primero)
|
|
**Bloquea:** Ninguna
|
|
**Esfuerzo:** 8h
|
|
**Épicas:** N/A (transversal)
|
|
|
|
**Subtareas Nivel 2:**
|
|
|
|
#### ST3.1: Eliminar Archivos Temporales (0.5h)
|
|
|
|
**Archivos identificados:**
|
|
- workspace-v2/nul (error Windows)
|
|
- workspace-v2/" -u" (error comando)
|
|
- workspace-v2/-u (error comando)
|
|
|
|
**Metodología:**
|
|
```bash
|
|
rm -f nul " -u" -u
|
|
git add -A && git commit -m "chore: Remove temporary error files"
|
|
```
|
|
|
|
#### ST3.2: Reorganizar docs/ si Necesario (4h)
|
|
|
|
**Análisis:** docs/ está bien organizado (00-vision, 01-arquitectura, 02-definicion-modulos, etc.)
|
|
|
|
**Acciones:**
|
|
- Validar no hay duplicados entre docs/ y orchestration/
|
|
- Verificar todas las referencias internas están correctas
|
|
- Actualizar _MAP.md de cada OQI si cambió estructura
|
|
|
|
#### ST3.3: Actualizar Inventarios Post-Purga (1.5h)
|
|
|
|
**Inventarios a actualizar:**
|
|
- FRONTEND_INVENTORY.yml (agregar detalle trading-platform)
|
|
- CODE-REUSE-MATRIX.yml (agregar trading-platform)
|
|
- REUSABLE-CODE-INVENTORY.yml (agregar módulos MCP genéricos)
|
|
- MASTER_INVENTORY.yml (reflejar cambios)
|
|
|
|
**Metodología CAPVED:**
|
|
```yaml
|
|
C: Leer inventarios actuales
|
|
A: Identificar qué falta
|
|
P: Redactar nuevas secciones
|
|
V: Validar YAML syntax
|
|
E: Actualizar archivos + commit
|
|
D: Actualizar INVENTORY-INDEX.md
|
|
```
|
|
|
|
#### ST3.4: Crear Deployment Guide (2h)
|
|
|
|
**Contenido:**
|
|
- Docker setup (docker-compose.yml)
|
|
- Environment variables (.env.example)
|
|
- Database initialization (scripts/database/)
|
|
- Service startup order
|
|
- Common issues y troubleshooting
|
|
|
|
**Ubicación:** docs/90-transversal/deployment/DEPLOYMENT-GUIDE.md
|
|
|
|
---
|
|
|
|
### ST4: BLOCKERS P0 RESOLUTION (380h)
|
|
|
|
**ID:** TASK-2026-02-01-BLOCKERS-P0-RESOLUTION
|
|
**Prioridad:** P0 - CRÍTICO
|
|
**Descripción:** Resolver 4 blockers que impiden GO-LIVE
|
|
**Bloqueada por:** ST1 (coherencia debe estar resuelta)
|
|
**Bloquea:** GO-LIVE Q2 2026
|
|
**Esfuerzo:** 380h
|
|
**Épicas:** OQI-001, 002, 005, 009
|
|
|
|
**Subtareas Nivel 2:**
|
|
|
|
#### ST4.1: BLOCKER-001: Auto-Refresh Tokens (60h, P0)
|
|
|
|
**Descripción:** Implementar auto-refresh de JWT tokens
|
|
|
|
**Subtareas Nivel 3:**
|
|
|
|
| ID | Tarea | Ubicación | Esfuerzo | CAPVED |
|
|
|----|-------|-----------|----------|--------|
|
|
| ST4.1.1 | Backend: Endpoint /auth/refresh mejorado | backend/src/modules/auth/auth.controller.ts | 8h | ✅ |
|
|
| ST4.1.2 | Backend: Refresh token rotation | backend/src/modules/auth/auth.service.ts | 12h | ✅ |
|
|
| ST4.1.3 | Frontend: Axios interceptor auto-refresh | frontend/src/services/apiClient.ts | 15h | ✅ |
|
|
| ST4.1.4 | Frontend: Token storage secure | frontend/src/utils/storage.ts | 8h | ✅ |
|
|
| ST4.1.5 | Tests: E2E token refresh flow | tests/e2e/auth/token-refresh.spec.ts | 10h | ✅ |
|
|
| ST4.1.6 | Documentación: ET-AUTH-006 Token Lifecycle | docs/02-definicion-modulos/OQI-001/especificaciones/ | 4h | ✅ |
|
|
| ST4.1.7 | Validación + Deploy | - | 3h | ✅ |
|
|
|
|
**Metodología CAPVED (ST4.1):**
|
|
```yaml
|
|
C: Leer auth module actual, OAuth flows, session management
|
|
A: Identificar puntos de falla (expiración JWT 1h)
|
|
P: Diseñar interceptor Axios + rotation backend
|
|
V: Tests E2E: expirar token → auto-refresh → continuar request
|
|
E: Implementar interceptor + backend + tests
|
|
D: ET-AUTH-006, actualizar TRACEABILITY.yml
|
|
```
|
|
|
|
**Criterios Aceptación:**
|
|
- ✅ Token refresh automático sin intervención usuario
|
|
- ✅ Refresh token rotation (seguridad)
|
|
- ✅ Manejo de errores (refresh token expirado → re-login)
|
|
- ✅ Tests E2E pass 100%
|
|
|
|
---
|
|
|
|
#### ST4.2: BLOCKER-002: PCI-DSS Compliance (80h, P0)
|
|
|
|
**Descripción:** Refactor payments module para PCI-DSS compliance
|
|
|
|
**Subtareas Nivel 3:**
|
|
|
|
| ID | Tarea | Ubicación | Esfuerzo | CAPVED |
|
|
|----|-------|-----------|----------|--------|
|
|
| ST4.2.1 | Backend: Payment Intent server-side | backend/src/modules/payments/stripe.service.ts | 20h | ✅ |
|
|
| ST4.2.2 | Backend: Webhook Stripe eventos | backend/src/modules/payments/webhook.controller.ts | 15h | ✅ |
|
|
| ST4.2.3 | Frontend: Stripe Elements integration | frontend/src/modules/payments/StripeElementsWrapper.tsx | 15h | ✅ |
|
|
| ST4.2.4 | Frontend: Eliminar datos tarjeta del estado | frontend/src/modules/payments/ (refactor completo) | 10h | ✅ |
|
|
| ST4.2.5 | Tests: PCI-DSS compliance validation | tests/security/pci-dss.spec.ts | 8h | ✅ |
|
|
| ST4.2.6 | Security audit: Penetration testing | (externo) | 8h | N/A |
|
|
| ST4.2.7 | Documentación: ET-PAY-006 PCI-DSS | docs/02-definicion-modulos/OQI-005/especificaciones/ | 4h | ✅ |
|
|
|
|
**Metodología CAPVED (ST4.2):**
|
|
```yaml
|
|
C: Leer docs Stripe Payment Intents, PCI-DSS requirements
|
|
A: Identificar violaciones actuales (datos tarjeta en frontend)
|
|
P: Diseñar flujo Payment Intent server-side + Stripe Elements
|
|
V: Validar con checklist PCI-DSS Level 1
|
|
E: Refactor completo payments module
|
|
D: ET-PAY-006, security audit report
|
|
```
|
|
|
|
**Criterios Aceptación:**
|
|
- ✅ 0 datos de tarjeta pasan por frontend
|
|
- ✅ Stripe Elements con Payment Intent
|
|
- ✅ Webhooks Stripe eventos (payment.succeeded, etc.)
|
|
- ✅ PCI-DSS Level 1 compliant (auditado externamente)
|
|
|
|
---
|
|
|
|
#### ST4.3: BLOCKER-003: Video Upload Backend (60h, P0)
|
|
|
|
**Descripción:** Implementar upload de videos educativos + storage + CDN
|
|
|
|
**Subtareas Nivel 3:**
|
|
|
|
| ID | Tarea | Ubicación | Esfuerzo | CAPVED |
|
|
|----|-------|-----------|----------|--------|
|
|
| ST4.3.1 | Backend: Multipart upload endpoint | backend/src/modules/education/video.controller.ts | 15h | ✅ |
|
|
| ST4.3.2 | Backend: S3/Cloudflare R2 integration | backend/src/services/storage.service.ts | 12h | ✅ |
|
|
| ST4.3.3 | Backend: Transcode video (FFmpeg) | backend/src/services/video.service.ts | 10h | ✅ |
|
|
| ST4.3.4 | Backend: CDN URL generation | backend/src/services/cdn.service.ts | 5h | ✅ |
|
|
| ST4.3.5 | Frontend: VideoUploadForm integration | frontend/src/modules/education/VideoUploadForm.tsx | 8h | ✅ |
|
|
| ST4.3.6 | Database: video metadata table | database/ddl/schemas/education/tables/videos.sql | 4h | ✅ |
|
|
| ST4.3.7 | Tests: Upload flow E2E | tests/e2e/education/video-upload.spec.ts | 4h | ✅ |
|
|
| ST4.3.8 | Documentación: ET-EDU-008 Video Upload | docs/02-definicion-modulos/OQI-002/especificaciones/ | 2h | ✅ |
|
|
|
|
**Metodología CAPVED (ST4.3):**
|
|
```yaml
|
|
C: Leer VideoUploadForm.tsx, AWS S3 docs, FFmpeg docs
|
|
A: Identificar flujo completo (upload → storage → transcode → CDN)
|
|
P: Diseñar arquitectura multipart + S3 + FFmpeg + Cloudflare CDN
|
|
V: Tests E2E: upload video → verify stored → play from CDN
|
|
E: Implementar backend + frontend integration
|
|
D: ET-EDU-008, actualizar TRACEABILITY.yml
|
|
```
|
|
|
|
**Criterios Aceptación:**
|
|
- ✅ Upload multipart (archivos grandes >100MB)
|
|
- ✅ Storage S3/Cloudflare R2
|
|
- ✅ Transcode automático (múltiples resoluciones: 1080p, 720p, 480p)
|
|
- ✅ CDN URL generation (Cloudflare)
|
|
- ✅ VideoUploadForm funcional con progress bar
|
|
|
|
---
|
|
|
|
#### ST4.4: BLOCKER-004: MT4 Gateway Funcional (180h, P0)
|
|
|
|
**Descripción:** Implementar protocolo completo MetaTrader 4 Gateway
|
|
|
|
**Subtareas Nivel 3:**
|
|
|
|
| ID | Tarea | Ubicación | Esfuerzo | CAPVED |
|
|
|----|-------|-----------|----------|--------|
|
|
| ST4.4.1 | MT4 EA: Expert Advisor base | mcp-mt4/ea/TradingPlatformBridge.mq4 | 30h | ✅ |
|
|
| ST4.4.2 | MT4 EA: WebSocket client MQL4 | mcp-mt4/ea/WebSocketClient.mqh | 25h | ✅ |
|
|
| ST4.4.3 | Backend: WebSocket server MT4 | mcp-mt4/src/services/mt4-websocket.service.ts | 20h | ✅ |
|
|
| ST4.4.4 | Backend: Order sync bidirectional | mcp-mt4/src/services/order-sync.service.ts | 30h | ✅ |
|
|
| ST4.4.5 | Backend: Account sync (balance, equity) | mcp-mt4/src/services/account-sync.service.ts | 20h | ✅ |
|
|
| ST4.4.6 | Backend: Position tracking real-time | mcp-mt4/src/services/position-tracking.service.ts | 15h | ✅ |
|
|
| ST4.4.7 | Protocol: Diseño y documentación | mcp-mt4/docs/MT4-PROTOCOL.md | 12h | ✅ |
|
|
| ST4.4.8 | Tests: E2E MT4 integration | tests/e2e/mt4/gateway.spec.ts | 18h | ✅ |
|
|
| ST4.4.9 | Deployment: MT4 EA installer | mcp-mt4/installer/ | 8h | ✅ |
|
|
| ST4.4.10 | Documentación: ET-MT4-001 a 005 | docs/02-definicion-modulos/OQI-009/especificaciones/ | 2h | ✅ |
|
|
|
|
**Metodología CAPVED (ST4.4):**
|
|
```yaml
|
|
C: Leer MT4 MQL4 docs, WebSocket protocols, existing stubs
|
|
A: Identificar protocolo completo (handshake, order commands, sync)
|
|
P: Diseñar arquitectura EA + WebSocket server + order sync
|
|
V: Tests E2E: EA conecta → place order MT4 → sync backend → display frontend
|
|
E: Implementar EA (MQL4) + backend (TypeScript) + protocol docs
|
|
D: ET-MT4-001 a 005, actualizar TRACEABILITY.yml, user guide
|
|
```
|
|
|
|
**Criterios Aceptación:**
|
|
- ✅ EA MT4 se conecta vía WebSocket a backend
|
|
- ✅ Order sync bidirectional (MT4 ↔ Backend)
|
|
- ✅ Account sync real-time (balance, equity, margin)
|
|
- ✅ Position tracking en frontend
|
|
- ✅ Installer MT4 EA para usuarios finales
|
|
- ✅ Protocol documentado completamente
|
|
|
|
---
|
|
|
|
### ST5: ROADMAP Q1-Q4 EXECUTION (2,057h)
|
|
|
|
**ID:** TASK-2026-02-05-ROADMAP-Q1-Q4-EXECUTION
|
|
**Prioridad:** P1-P3 (según fase)
|
|
**Descripción:** Ejecutar roadmap completo Q1-Q4 2026 post-blockers
|
|
**Bloqueada por:** ST4 (blockers deben resolverse primero)
|
|
**Bloquea:** GO-LIVE Production Q2, Scalability Q3, Innovation Q4
|
|
**Esfuerzo:** 2,057h
|
|
**Épicas:** ALL
|
|
|
|
**Subtareas Nivel 2 (por fase):**
|
|
|
|
#### ST5.1: FASE 1 - Security & Blockers Q1 (201h - COMPLETADA en ST4)
|
|
|
|
**Nota:** Esta fase se ejecuta en ST4. Total 201h ya incluido.
|
|
|
|
**Restante Fase 1:**
|
|
- Deployment Guide (2h) - en ST3.4
|
|
- Runbooks (16h) - nuevo
|
|
- Security audit inicial (30h) - nuevo
|
|
|
|
**Subtareas adicionales:**
|
|
|
|
| ID | Tarea | Esfuerzo |
|
|
|----|-------|----------|
|
|
| ST5.1.1 | Crear Runbooks operacionales | 16h |
|
|
| ST5.1.2 | Security audit inicial (OWASP top 10) | 30h |
|
|
|
|
**Total Fase 1 real:** 201h (ya en ST4) + 48h = 249h
|
|
|
|
---
|
|
|
|
#### ST5.2: FASE 2 - Core Features Q2 (362h)
|
|
|
|
**Target:** Completar features críticas para GO-LIVE
|
|
|
|
**Subtareas Nivel 3:**
|
|
|
|
| ID | Feature | Esfuerzo | Épica | Prioridad |
|
|
|----|---------|----------|-------|-----------|
|
|
| ST5.2.1 | Live streaming educativo (WebRTC + RTMP) | 80h | OQI-002 | P1 |
|
|
| ST5.2.2 | WebSocket real-time trading (centralizado) | 60h | OQI-003 | P1 |
|
|
| ST5.2.3 | Portfolio optimizer (Markowitz) | 80h | OQI-008 | P1 |
|
|
| ST5.2.4 | Auto-rebalancing portfolio | 40h | OQI-008 | P1 |
|
|
| ST5.2.5 | OrderBook depth real-time WebSocket | 40h | OQI-003 | P2 |
|
|
| ST5.2.6 | Drawing tools persistence WebSocket | 25h | OQI-003 | P2 |
|
|
| ST5.2.7 | LLM context memory optimization | 40h | OQI-007 | P2 |
|
|
|
|
**Metodología CAPVED (cada feature):**
|
|
```yaml
|
|
C: Leer especificaciones técnicas ET-XXX, US relacionadas
|
|
A: Identificar arquitectura necesaria, dependencias
|
|
P: Diseñar solución (backend + frontend + DB si aplica)
|
|
V: Tests E2E + performance benchmarks
|
|
E: Implementar feature completa
|
|
D: Actualizar ET specs, TRACEABILITY.yml, user guide
|
|
```
|
|
|
|
---
|
|
|
|
#### ST5.3: FASE 3 - Scalability & Performance Q3 (380h)
|
|
|
|
**Target:** Optimizar para 10k usuarios
|
|
|
|
**Subtareas Nivel 3:**
|
|
|
|
| ID | Tarea | Esfuerzo | Prioridad |
|
|
|----|-------|----------|-----------|
|
|
| ST5.3.1 | Performance: WebP images + compression | 20h | P1 |
|
|
| ST5.3.2 | Performance: Lazy loading components | 30h | P1 |
|
|
| ST5.3.3 | Performance: Code-splitting por rutas | 40h | P1 |
|
|
| ST5.3.4 | Performance: Tree-shaking optimizado | 10h | P2 |
|
|
| ST5.3.5 | E2E Testing suite (Cypress/Playwright) | 120h | P1 |
|
|
| ST5.3.6 | Security audit completo (penetration testing) | 100h | P1 |
|
|
| ST5.3.7 | Error Boundaries por epic | 15h | P1 |
|
|
| ST5.3.8 | Monitoring + Observability (Datadog/Sentry) | 30h | P1 |
|
|
| ST5.3.9 | CDN setup (Cloudflare) | 15h | P2 |
|
|
|
|
**Criterios Aceptación Fase 3:**
|
|
- ✅ FCP <1.5s, TTI <3s, LCP <2.5s
|
|
- ✅ Bundle size <500KB (gzip)
|
|
- ✅ E2E test coverage >70%
|
|
- ✅ Security audit PASS (0 vulnerabilidades críticas)
|
|
|
|
---
|
|
|
|
#### ST5.4: FASE 4 - Advanced Features Q4 (1,514h)
|
|
|
|
**Target:** Innovación y diferenciación
|
|
|
|
**Subtareas Nivel 3 (Top 10):**
|
|
|
|
| ID | Feature | Esfuerzo | Épica | Prioridad |
|
|
|----|---------|----------|-------|-----------|
|
|
| ST5.4.1 | Audio/Podcast educativo (upload + streaming) | 120h | OQI-002 | P2 |
|
|
| ST5.4.2 | Voice input LLM (Whisper API) | 50h | OQI-007 | P2 |
|
|
| ST5.4.3 | Advanced ML models (deep learning) | 200h | OQI-006 | P2 |
|
|
| ST5.4.4 | PDF reports automáticos (template engine) | 80h | OQI-008 | P2 |
|
|
| ST5.4.5 | Marketplace productos (venta señales ML) | 150h | OQI-009 | P2 |
|
|
| ST5.4.6 | Social trading (copy trading) | 200h | NEW | P3 |
|
|
| ST5.4.7 | Mobile app (React Native) | 300h | NEW | P3 |
|
|
| ST5.4.8 | Advanced charts (TradingView integration) | 80h | OQI-003 | P3 |
|
|
| ST5.4.9 | Multi-language i18n (ES, EN, PT) | 60h | ALL | P2 |
|
|
| ST5.4.10 | Admin analytics dashboard | 100h | OQI-013 | P2 |
|
|
| ... | Otros features backlog | 174h | - | P3 |
|
|
|
|
**Total Fase 4:** 1,514h
|
|
|
|
---
|
|
|
|
## ORDEN DE EJECUCIÓN
|
|
|
|
### Dependencias y Secuenciación
|
|
|
|
```mermaid
|
|
graph TD
|
|
A[ANÁLISIS COMPLETADO] --> ST1[ST1: Coherencia Fixes]
|
|
ST1 --> ST2[ST2: Documentation Integration]
|
|
ST1 --> ST4[ST4: Blockers P0]
|
|
ST2 --> ST3[ST3: Documentation Purge]
|
|
ST4 --> ST5[ST5: Roadmap Q1-Q4]
|
|
|
|
ST1 -.->|No bloquea| ST2
|
|
ST2 -.->|No bloquea| ST4
|
|
|
|
ST4 --> ST4.1[ST4.1: Token Refresh]
|
|
ST4 --> ST4.2[ST4.2: PCI-DSS]
|
|
ST4 --> ST4.3[ST4.3: Video Upload]
|
|
ST4.1 --> ST4.4[ST4.4: MT4 Gateway]
|
|
ST4.2 --> ST4.4
|
|
ST4.3 --> ST4.4
|
|
|
|
ST4.4 --> ST5.2[ST5.2: FASE 2 Q2]
|
|
ST5.2 --> ST5.3[ST5.3: FASE 3 Q3]
|
|
ST5.3 --> ST5.4[ST5.4: FASE 4 Q4]
|
|
```
|
|
|
|
### Timeline Gantt
|
|
|
|
```
|
|
Q1 2026 (ene-mar):
|
|
Semana 1-2: ST1 (Coherencia) + ST2 (Docs Integration) paralelo
|
|
Semana 3: ST3 (Docs Purge)
|
|
Semana 4-12: ST4.1, ST4.2, ST4.3 (Blockers P0)
|
|
|
|
Q2 2026 (abr-jun):
|
|
Semana 1-8: ST4.4 (MT4 Gateway)
|
|
Semana 9-16: ST5.2 (Core Features)
|
|
|
|
Q3 2026 (jul-sep):
|
|
Semana 1-12: ST5.3 (Scalability & Performance)
|
|
|
|
Q4 2026 (oct-dic):
|
|
Semana 1-16: ST5.4 (Advanced Features)
|
|
```
|
|
|
|
---
|
|
|
|
## ASIGNACIÓN DE RECURSOS
|
|
|
|
### Estimación de Equipo
|
|
|
|
**Recursos necesarios:**
|
|
- 2 Full-stack developers (backend + frontend)
|
|
- 1 ML engineer (part-time, 30%)
|
|
- 1 DevOps engineer (part-time, 20%)
|
|
- 1 QA engineer (part-time, 30%)
|
|
|
|
**Agentes IA:**
|
|
- Claude (planificación + validación)
|
|
- Gemini (descomposición de tareas)
|
|
- Windsurf (ejecución literal)
|
|
|
|
**Proceso:**
|
|
1. Claude genera plan detallado (esta tarea)
|
|
2. Gemini descompone en tareas atómicas (<50 LOC)
|
|
3. Windsurf ejecuta literalmente (NO decide)
|
|
4. Claude/Gemini valida (APROBADA/RECHAZADA)
|
|
|
|
---
|
|
|
|
## CRITERIOS DE ÉXITO POR SUBTAREA
|
|
|
|
### ST1: Coherencia Fixes P0
|
|
|
|
- ✅ TypeScript typecheck 0 errores
|
|
- ✅ All enums match DDL
|
|
- ✅ Portfolio types existen en backend + frontend
|
|
- ✅ COHERENCIA-REPORT.md actualizado
|
|
|
|
### ST2: Documentation Integration
|
|
|
|
- ✅ 8 ET specs creados
|
|
- ✅ 8 User Stories creados
|
|
- ✅ 34 endpoints Swagger documentados
|
|
- ✅ 8 Module READMEs en apps/
|
|
|
|
### ST3: Documentation Purge
|
|
|
|
- ✅ 0 archivos temporales
|
|
- ✅ Inventarios actualizados (FRONTEND, CODE-REUSE, MASTER)
|
|
- ✅ Deployment Guide creado
|
|
|
|
### ST4: Blockers P0 Resolution
|
|
|
|
- ✅ Token refresh automático funciona
|
|
- ✅ PCI-DSS Level 1 compliant (auditado)
|
|
- ✅ Video upload + CDN funcional
|
|
- ✅ MT4 Gateway EA conecta y sincroniza orders
|
|
|
|
### ST5: Roadmap Q1-Q4
|
|
|
|
- ✅ FASE 2: Live streaming, WebSocket trading, Portfolio optimizer operacionales
|
|
- ✅ FASE 3: Performance targets alcanzados, E2E >70%, Security audit PASS
|
|
- ✅ FASE 4: 10+ advanced features implementadas
|
|
|
|
---
|
|
|
|
## VALIDACIONES GLOBALES
|
|
|
|
### Pre-Commit (cada subtarea)
|
|
|
|
```bash
|
|
# Backend
|
|
npm run build && npm run lint && npm run test
|
|
|
|
# Frontend
|
|
npm run build && npm run lint && npm run typecheck && npm run test
|
|
|
|
# DDL
|
|
./scripts/recreate-database.sh
|
|
```
|
|
|
|
### Post-Task (cada subtarea)
|
|
|
|
- ✅ CAPVED completo (6 fases documentadas)
|
|
- ✅ Git commit con mensaje descriptivo
|
|
- ✅ TRACEABILITY.yml actualizado
|
|
- ✅ Inventarios sincronizados
|
|
- ✅ @DEF_CHK_POST ejecutado
|
|
|
|
---
|
|
|
|
## GESTIÓN DE RIESGOS
|
|
|
|
### Riesgos Identificados
|
|
|
|
| Riesgo | Probabilidad | Impacto | Mitigación |
|
|
|--------|--------------|---------|------------|
|
|
| MT4 Gateway protocolo complejo | Alta | Alto | 180h asignadas, prototipo primero |
|
|
| PCI-DSS audit falla | Media | Crítico | Auditoría externa Q1, correcciones inmediatas |
|
|
| Performance targets no alcanzados | Media | Alto | Benchmarking continuo Q3 |
|
|
| E2E tests frágiles | Alta | Medio | Page Object Model, tests atómicos |
|
|
| Scope creep Fase 4 | Media | Medio | Priorización estricta, backlog congelado Q4 |
|
|
|
|
### Contingencias
|
|
|
|
**Si MT4 Gateway falla:**
|
|
- Fallback: Integración manual CSV (30h adicionales)
|
|
- Delay: Q3 en lugar de Q2
|
|
|
|
**Si PCI-DSS audit falla:**
|
|
- Correcciones inmediatas (40h adicionales)
|
|
- Re-audit (20h adicionales)
|
|
- Delay GO-LIVE: +2 semanas
|
|
|
|
---
|
|
|
|
## MÉTRICAS DE SEGUIMIENTO
|
|
|
|
### KPIs por Fase
|
|
|
|
**FASE 1 (Q1):**
|
|
- Blockers P0 resueltos: 4/4
|
|
- Coherencia gaps resueltos: 7/7
|
|
- Security vulnerabilidades P0: 0
|
|
|
|
**FASE 2 (Q2):**
|
|
- Features core completadas: 100%
|
|
- MT4 Gateway funcional: Sí
|
|
- GO-LIVE preparado: Sí
|
|
|
|
**FASE 3 (Q3):**
|
|
- FCP: <1.5s
|
|
- E2E coverage: >70%
|
|
- Security audit: PASS
|
|
|
|
**FASE 4 (Q4):**
|
|
- Advanced features: >10
|
|
- Usuarios activos: 10k+
|
|
- MRR: $500k+
|
|
|
|
---
|
|
|
|
## DOCUMENTACIÓN OBLIGATORIA POR SUBTAREA
|
|
|
|
Cada subtarea nivel 2 y 3 DEBE generar:
|
|
|
|
1. **METADATA.yml** - Metadatos de la tarea
|
|
2. **01-CONTEXTO.md** - Contexto específico
|
|
3. **02-ANALISIS.md** - Análisis técnico
|
|
4. **03-PLAN.md** - Plan de implementación
|
|
5. **04-VALIDACION.md** - Resultados de validaciones
|
|
6. **05-EJECUCION.md** - Registro de ejecución
|
|
7. **06-DOCUMENTACION.md** - Documentación final
|
|
|
|
**Ubicación:**
|
|
- orchestration/tareas/TASK-YYYY-MM-DD-{nombre}/
|
|
|
|
**Excepción:** Subtareas nivel 3 operacionales (<2h) pueden omitir CAPVED completo si son triviales (typo fixes, etc.), pero DEBEN documentarse en la tarea nivel 2 padre.
|
|
|
|
---
|
|
|
|
## INTEGRACIÓN CON SISTEMA SIMCO
|
|
|
|
### Triggers Aplicados
|
|
|
|
- **@TRIGGER-COHERENCIA:** ST1 debe ejecutarse antes de cualquier feature nueva
|
|
- **@TRIGGER-INVENTARIOS:** Actualizar inventarios post-cada-tarea
|
|
- **@TRIGGER-CIERRE:** Ejecutar @DEF_CHK_POST antes de marcar completada
|
|
- **@TRIGGER-FETCH-OBLIGATORIO:** git fetch antes de iniciar cualquier subtarea
|
|
- **@TRIGGER-COMMIT-PUSH-OBLIGATORIO:** git commit + push al finalizar cada subtarea
|
|
|
|
### Directivas Cargadas
|
|
|
|
- @SIMCO-TAREA
|
|
- @CAPVED
|
|
- @EDICION-SEGURA
|
|
- @NO-PLACEHOLDERS
|
|
- @VALIDATION-F4
|
|
|
|
---
|
|
|
|
## RESUMEN DEL PLAN
|
|
|
|
**Total Subtareas:**
|
|
- Nivel 1: 5 estratégicas
|
|
- Nivel 2: 20+ tácticas
|
|
- Nivel 3: 50+ operacionales
|
|
|
|
**Total Esfuerzo:**
|
|
- ST1: 6.5h
|
|
- ST2: 47.5h
|
|
- ST3: 8h
|
|
- ST4: 380h
|
|
- ST5: 2,057h
|
|
- **TOTAL: ~2,500h**
|
|
|
|
**Timeline:**
|
|
- Q1 2026: Security & Blockers (249h)
|
|
- Q2 2026: Core Features + MT4 (542h)
|
|
- Q3 2026: Scalability & Performance (380h)
|
|
- Q4 2026: Advanced Features (1,514h)
|
|
|
|
**Target GO-LIVE:** Q2 2026 (post-blockers P0 + MT4 Gateway)
|
|
|
|
---
|
|
|
|
## PRÓXIMOS PASOS
|
|
|
|
1. ✅ **COMPLETADO:** Plan exhaustivo creado
|
|
2. **SIGUIENTE:** Validar plan con checklist (04-VALIDACION.md)
|
|
3. **APROBAR:** Usuario aprueba plan
|
|
4. **EJECUTAR:** Iniciar ST1 (Coherencia Fixes P0)
|
|
|
|
---
|
|
|
|
**Fecha de Completitud:** 2026-01-26 17:30
|
|
**Siguiente Fase:** 04-VALIDACION.md
|