Some checks failed
ERP Core CI / Backend Lint (push) Has been cancelled
ERP Core CI / Backend Unit Tests (push) Has been cancelled
ERP Core CI / Backend Integration Tests (push) Has been cancelled
ERP Core CI / Frontend Lint (push) Has been cancelled
ERP Core CI / Frontend Unit Tests (push) Has been cancelled
ERP Core CI / Frontend E2E Tests (push) Has been cancelled
ERP Core CI / Database DDL Validation (push) Has been cancelled
ERP Core CI / Backend Build (push) Has been cancelled
ERP Core CI / Frontend Build (push) Has been cancelled
ERP Core CI / CI Success (push) Has been cancelled
Performance Tests / Lighthouse CI (push) Has been cancelled
Performance Tests / Bundle Size Analysis (push) Has been cancelled
Performance Tests / k6 Load Tests (push) Has been cancelled
Performance Tests / Performance Summary (push) Has been cancelled
- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones en modulos CRM y OpenAPI Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
492 lines
13 KiB
Markdown
492 lines
13 KiB
Markdown
# FASE 3: PLANEACION BASADA EN ANALISIS
|
|
# Plan de Ejecucion para Integracion SaaS e IA
|
|
|
|
**Version:** 1.0.0
|
|
**Fecha:** 2026-01-10
|
|
**Estado:** EN PROGRESO
|
|
**Fase Anterior:** FASE-2-ANALISIS-DETALLADO-SAAS-IA.md
|
|
|
|
---
|
|
|
|
## RESUMEN EJECUTIVO
|
|
|
|
Este documento define el plan de ejecucion detallado para integrar los alcances SaaS e IA en la documentacion de ERP Core, basado en el analisis de las fases anteriores.
|
|
|
|
**Total de pasos:** 12
|
|
**Archivos a crear:** 5
|
|
**Archivos a modificar:** 3
|
|
**Lineas estimadas:** ~1,235
|
|
|
|
---
|
|
|
|
## 1. PLAN DE EJECUCION
|
|
|
|
### 1.1 Orden de Ejecucion
|
|
|
|
```
|
|
PASO 1: Crear _MAP.md en vision-general
|
|
|
|
|
v
|
|
PASO 2: Crear STACK-TECNOLOGICO.md
|
|
|
|
|
v
|
|
PASO 3: Crear INTEGRACIONES-EXTERNAS.md
|
|
|
|
|
v
|
|
PASO 4: Crear ARQUITECTURA-SAAS.md
|
|
|
|
|
v
|
|
PASO 5: Crear ARQUITECTURA-IA.md
|
|
|
|
|
v
|
|
PASO 6: Modificar VISION-ERP-CORE.md
|
|
|
|
|
v
|
|
PASO 7: Modificar docs/_MAP.md
|
|
|
|
|
v
|
|
PASO 8: Modificar INDICE-MODULOS.md
|
|
|
|
|
v
|
|
CHECKPOINT: Validacion de coherencia
|
|
|
|
|
v
|
|
PASO 9: Validar enlaces internos
|
|
|
|
|
v
|
|
PASO 10: Validar frontmatter SIMCO
|
|
|
|
|
v
|
|
PASO 11: Validar consistencia de contenido
|
|
|
|
|
v
|
|
PASO 12: Generar reporte final
|
|
```
|
|
|
|
---
|
|
|
|
## 2. DETALLE POR PASO
|
|
|
|
### PASO 1: Crear _MAP.md en vision-general
|
|
|
|
**Archivo:** `/docs/00-vision-general/_MAP.md`
|
|
**Prioridad:** P0
|
|
**Dependencias:** Ninguna
|
|
**Duracion estimada:** 5 minutos
|
|
|
|
**Contenido:**
|
|
```markdown
|
|
---
|
|
id: MAP-VISION-GENERAL
|
|
title: Indice - Vision General
|
|
type: Index
|
|
status: Published
|
|
version: 1.0.0
|
|
created_date: 2026-01-10
|
|
updated_date: 2026-01-10
|
|
---
|
|
|
|
# Vision General - Indice de Navegacion
|
|
|
|
> Documentacion de vision, arquitectura y alcances del proyecto ERP Core
|
|
|
|
## Contenido Principal
|
|
|
|
| Archivo | Descripcion | Estado | Prioridad |
|
|
|---------|-------------|--------|-----------|
|
|
| [VISION-ERP-CORE.md](VISION-ERP-CORE.md) | Vision general, alcances core, SaaS e IA | Activo | P0 |
|
|
| [ARQUITECTURA-SAAS.md](ARQUITECTURA-SAAS.md) | Arquitectura de plataforma SaaS | Activo | P1 |
|
|
| [ARQUITECTURA-IA.md](ARQUITECTURA-IA.md) | Arquitectura de inteligencia artificial | Activo | P1 |
|
|
| [INTEGRACIONES-EXTERNAS.md](INTEGRACIONES-EXTERNAS.md) | Catalogo de integraciones externas | Activo | P1 |
|
|
| [STACK-TECNOLOGICO.md](STACK-TECNOLOGICO.md) | Stack tecnologico detallado | Activo | P1 |
|
|
|
|
## Estructura del Directorio
|
|
|
|
```
|
|
00-vision-general/
|
|
├── _MAP.md <- Este archivo
|
|
├── VISION-ERP-CORE.md <- Documento principal
|
|
├── ARQUITECTURA-SAAS.md <- Detalles SaaS
|
|
├── ARQUITECTURA-IA.md <- Detalles IA
|
|
├── INTEGRACIONES-EXTERNAS.md <- Integraciones
|
|
└── STACK-TECNOLOGICO.md <- Stack
|
|
```
|
|
|
|
## Navegacion
|
|
|
|
| Direccion | Destino |
|
|
|-----------|---------|
|
|
| Padre | [docs/](../_MAP.md) |
|
|
| Siguiente | [01-arquitectura/](../01-arquitectura/_MAP.md) |
|
|
| Relacionado | [02-definicion-modulos/](../02-definicion-modulos/_MAP.md) |
|
|
|
|
## Historial de Cambios
|
|
|
|
| Fecha | Version | Cambio |
|
|
|-------|---------|--------|
|
|
| 2026-01-10 | 1.0.0 | Creacion inicial con estructura SaaS/IA |
|
|
|
|
---
|
|
|
|
*Actualizado: 2026-01-10*
|
|
```
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Archivo existe en ubicacion correcta
|
|
- [ ] Frontmatter SIMCO completo
|
|
- [ ] Tabla de contenido lista todos los archivos
|
|
- [ ] Enlaces de navegacion correctos
|
|
|
|
---
|
|
|
|
### PASO 2: Crear STACK-TECNOLOGICO.md
|
|
|
|
**Archivo:** `/docs/00-vision-general/STACK-TECNOLOGICO.md`
|
|
**Prioridad:** P1
|
|
**Dependencias:** PASO 1
|
|
**Duracion estimada:** 10 minutos
|
|
|
|
**Contenido principal:**
|
|
- Seccion Backend (Node.js, Express, TypeScript, TypeORM, etc.)
|
|
- Seccion Frontend (React, Vite, Zustand, Tailwind, etc.)
|
|
- Seccion Database (PostgreSQL, RLS, Redis)
|
|
- Seccion Servicios Externos (Stripe, SendGrid, OpenRouter, etc.)
|
|
- Seccion DevOps (Docker, CI/CD)
|
|
- Guia de setup de desarrollo
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Todas las tecnologias del stack documentadas
|
|
- [ ] Versiones especificadas
|
|
- [ ] Proposito de cada tecnologia claro
|
|
- [ ] Frontmatter SIMCO completo
|
|
|
|
---
|
|
|
|
### PASO 3: Crear INTEGRACIONES-EXTERNAS.md
|
|
|
|
**Archivo:** `/docs/00-vision-general/INTEGRACIONES-EXTERNAS.md`
|
|
**Prioridad:** P1
|
|
**Dependencias:** PASO 2
|
|
**Duracion estimada:** 15 minutos
|
|
|
|
**Contenido principal:**
|
|
- Catalogo de integraciones (tabla maestra)
|
|
- Seccion Stripe (billing)
|
|
- Seccion SendGrid/SES (email)
|
|
- Seccion OpenRouter (LLM)
|
|
- Seccion Meta WhatsApp Business
|
|
- Seccion AWS S3/Cloudflare R2 (storage)
|
|
- Seccion Redis/BullMQ (cache/queue)
|
|
- Variables de entorno requeridas por integracion
|
|
- Guias de configuracion
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Todas las integraciones listadas
|
|
- [ ] Variables de entorno documentadas
|
|
- [ ] Guias de configuracion incluidas
|
|
- [ ] Frontmatter SIMCO completo
|
|
|
|
---
|
|
|
|
### PASO 4: Crear ARQUITECTURA-SAAS.md
|
|
|
|
**Archivo:** `/docs/00-vision-general/ARQUITECTURA-SAAS.md`
|
|
**Prioridad:** P1
|
|
**Dependencias:** PASO 3
|
|
**Duracion estimada:** 20 minutos
|
|
|
|
**Contenido principal:**
|
|
- Diagrama de arquitectura multi-tenant
|
|
- Explicacion de RLS (Row-Level Security)
|
|
- Modelo de datos SaaS (schemas, tablas)
|
|
- Flujo de billing y suscripciones
|
|
- Flujo de feature gating
|
|
- Flujo de webhooks outbound
|
|
- Planes y limites
|
|
- Patrones de extension SaaS
|
|
- ADRs relacionados
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Diagrama de arquitectura incluido (Mermaid)
|
|
- [ ] RLS explicado con ejemplos
|
|
- [ ] Flujos documentados paso a paso
|
|
- [ ] Frontmatter SIMCO completo
|
|
|
|
---
|
|
|
|
### PASO 5: Crear ARQUITECTURA-IA.md
|
|
|
|
**Archivo:** `/docs/00-vision-general/ARQUITECTURA-IA.md`
|
|
**Prioridad:** P1
|
|
**Dependencias:** PASO 4
|
|
**Duracion estimada:** 20 minutos
|
|
|
|
**Contenido principal:**
|
|
- Diagrama de arquitectura IA
|
|
- Flujo de MCP Server
|
|
- Flujo de LLM Gateway (OpenRouter)
|
|
- Herramientas MCP disponibles
|
|
- Flujo de WhatsApp con IA
|
|
- Algoritmos de prediccion de inventario
|
|
- Modelo de datos IA (schemas, tablas)
|
|
- Patrones de extension IA
|
|
- ADRs relacionados
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Diagrama de arquitectura incluido (Mermaid)
|
|
- [ ] Herramientas MCP listadas
|
|
- [ ] Algoritmos documentados con formulas
|
|
- [ ] Frontmatter SIMCO completo
|
|
|
|
---
|
|
|
|
### PASO 6: Modificar VISION-ERP-CORE.md
|
|
|
|
**Archivo:** `/docs/00-vision-general/VISION-ERP-CORE.md`
|
|
**Prioridad:** P0
|
|
**Dependencias:** PASOS 1-5
|
|
**Duracion estimada:** 30 minutos
|
|
|
|
**Cambios principales:**
|
|
|
|
1. **Agregar frontmatter SIMCO** (lineas 1-10)
|
|
2. **Modificar Resumen Ejecutivo** (lineas 1-8)
|
|
- Agregar capacidades SaaS
|
|
- Agregar capacidades IA
|
|
3. **Modificar Proposito** (lineas 9-30)
|
|
- Agregar "plataformas modernas requieren..."
|
|
- Agregar "SaaS-Ready" y "AI-First" en solucion
|
|
4. **Modificar Objetivos** (lineas 31-48)
|
|
- Agregar objetivos SaaS en corto plazo
|
|
- Agregar objetivos SaaS/IA en mediano plazo
|
|
- Agregar objetivos IA en largo plazo
|
|
5. **Modificar Arquitectura** (lineas 49-89)
|
|
- Reemplazar diagrama con version expandida
|
|
- Incluir capas SaaS e IA
|
|
6. **Modificar tabla de Modulos** (lineas 90-112)
|
|
- Agregar MGN-016 a MGN-022
|
|
- Crear nuevas secciones por fase
|
|
7. **Agregar seccion "Alcance SaaS"** (nueva)
|
|
8. **Agregar seccion "Alcance IA"** (nueva)
|
|
9. **Agregar seccion "Integraciones Externas"** (nueva)
|
|
10. **Modificar Stack Tecnologico** (lineas 113-147)
|
|
- Agregar nuevas tecnologias
|
|
11. **Modificar Principios de Diseno** (lineas 148-166)
|
|
- Agregar principios 6, 7, 8
|
|
12. **Modificar Entregables por Fase** (lineas 167-193)
|
|
- Agregar Fase 4 (SaaS Platform)
|
|
- Agregar Fase 5 (IA Intelligence)
|
|
13. **Modificar Metricas de Exito** (lineas 204-217)
|
|
- Agregar metricas SaaS
|
|
- Agregar metricas IA
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Frontmatter SIMCO presente
|
|
- [ ] Todas las secciones nuevas incluidas
|
|
- [ ] Tabla de modulos actualizada con MGN-016 a MGN-022
|
|
- [ ] Diagrama de arquitectura actualizado
|
|
- [ ] Referencias a documentos relacionados
|
|
|
|
---
|
|
|
|
### PASO 7: Modificar docs/_MAP.md
|
|
|
|
**Archivo:** `/docs/_MAP.md`
|
|
**Prioridad:** P2
|
|
**Dependencias:** PASO 6
|
|
**Duracion estimada:** 5 minutos
|
|
|
|
**Cambios principales:**
|
|
- Actualizar descripcion de 00-vision-general
|
|
- Agregar referencia a nuevos archivos
|
|
- Actualizar fecha de modificacion
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Seccion vision-general actualizada
|
|
- [ ] Enlaces a nuevos archivos incluidos
|
|
- [ ] Fecha actualizada
|
|
|
|
---
|
|
|
|
### PASO 8: Modificar INDICE-MODULOS.md
|
|
|
|
**Archivo:** `/docs/02-definicion-modulos/INDICE-MODULOS.md`
|
|
**Prioridad:** P1
|
|
**Dependencias:** PASO 6
|
|
**Duracion estimada:** 10 minutos
|
|
|
|
**Cambios principales:**
|
|
- Agregar seccion "Fase 4: SaaS Platform"
|
|
- Agregar modulos MGN-016, MGN-017, MGN-018, MGN-019
|
|
- Agregar seccion "Fase 5: IA Intelligence"
|
|
- Agregar modulos MGN-020, MGN-021, MGN-022
|
|
- Actualizar contador total de modulos
|
|
|
|
**Criterios de aceptacion:**
|
|
- [ ] Nuevos modulos listados
|
|
- [ ] Descripciones claras
|
|
- [ ] Estados correctos (Planificado)
|
|
- [ ] Total de modulos actualizado
|
|
|
|
---
|
|
|
|
### CHECKPOINT: Validacion de Coherencia
|
|
|
|
**Duracion estimada:** 15 minutos
|
|
|
|
**Validaciones:**
|
|
- [ ] Terminologia consistente entre archivos
|
|
- [ ] Numeros de modulos no duplicados
|
|
- [ ] Referencias cruzadas correctas
|
|
- [ ] Diagramas renderizan correctamente
|
|
|
|
---
|
|
|
|
### PASO 9: Validar enlaces internos
|
|
|
|
**Duracion estimada:** 10 minutos
|
|
|
|
**Validaciones:**
|
|
- [ ] Todos los enlaces relativos funcionan
|
|
- [ ] No hay enlaces huerfanos
|
|
- [ ] No hay enlaces a archivos inexistentes
|
|
|
|
---
|
|
|
|
### PASO 10: Validar frontmatter SIMCO
|
|
|
|
**Duracion estimada:** 5 minutos
|
|
|
|
**Validaciones por archivo:**
|
|
- [ ] _MAP.md tiene frontmatter
|
|
- [ ] VISION-ERP-CORE.md tiene frontmatter
|
|
- [ ] ARQUITECTURA-SAAS.md tiene frontmatter
|
|
- [ ] ARQUITECTURA-IA.md tiene frontmatter
|
|
- [ ] INTEGRACIONES-EXTERNAS.md tiene frontmatter
|
|
- [ ] STACK-TECNOLOGICO.md tiene frontmatter
|
|
|
|
---
|
|
|
|
### PASO 11: Validar consistencia de contenido
|
|
|
|
**Duracion estimada:** 10 minutos
|
|
|
|
**Validaciones:**
|
|
- [ ] No hay informacion duplicada entre archivos
|
|
- [ ] Informacion complementaria, no redundante
|
|
- [ ] Nivel de detalle apropiado por documento
|
|
|
|
---
|
|
|
|
### PASO 12: Generar reporte final
|
|
|
|
**Duracion estimada:** 10 minutos
|
|
|
|
**Contenido del reporte:**
|
|
- Resumen de cambios realizados
|
|
- Lista de archivos creados/modificados
|
|
- Validaciones ejecutadas
|
|
- Gaps resueltos
|
|
- Metricas finales
|
|
|
|
---
|
|
|
|
## 3. MATRIZ DE RESPONSABILIDAD
|
|
|
|
| Paso | Archivo | Perfil Responsable | Estado |
|
|
|------|---------|-------------------|--------|
|
|
| 1 | _MAP.md | Documentation-Agent | Pendiente |
|
|
| 2 | STACK-TECNOLOGICO.md | Documentation-Agent | Pendiente |
|
|
| 3 | INTEGRACIONES-EXTERNAS.md | Documentation-Agent | Pendiente |
|
|
| 4 | ARQUITECTURA-SAAS.md | Architecture-Analyst | Pendiente |
|
|
| 5 | ARQUITECTURA-IA.md | Architecture-Analyst | Pendiente |
|
|
| 6 | VISION-ERP-CORE.md | Requirements-Analyst | Pendiente |
|
|
| 7 | docs/_MAP.md | Documentation-Agent | Pendiente |
|
|
| 8 | INDICE-MODULOS.md | Documentation-Agent | Pendiente |
|
|
| 9-12 | Validaciones | QA / All | Pendiente |
|
|
|
|
---
|
|
|
|
## 4. CRONOGRAMA DE EJECUCION
|
|
|
|
| Paso | Duracion | Acumulado |
|
|
|------|----------|-----------|
|
|
| PASO 1 | 5 min | 5 min |
|
|
| PASO 2 | 10 min | 15 min |
|
|
| PASO 3 | 15 min | 30 min |
|
|
| PASO 4 | 20 min | 50 min |
|
|
| PASO 5 | 20 min | 1h 10min |
|
|
| PASO 6 | 30 min | 1h 40min |
|
|
| PASO 7 | 5 min | 1h 45min |
|
|
| PASO 8 | 10 min | 1h 55min |
|
|
| CHECKPOINT | 15 min | 2h 10min |
|
|
| PASO 9 | 10 min | 2h 20min |
|
|
| PASO 10 | 5 min | 2h 25min |
|
|
| PASO 11 | 10 min | 2h 35min |
|
|
| PASO 12 | 10 min | 2h 45min |
|
|
| **TOTAL** | **~2h 45min** | |
|
|
|
|
---
|
|
|
|
## 5. CRITERIOS DE EXITO DEL PLAN
|
|
|
|
### 5.1 Criterios Obligatorios (Must Have)
|
|
|
|
- [ ] VISION-ERP-CORE.md actualizado con secciones SaaS e IA
|
|
- [ ] Tabla de modulos incluye MGN-016 a MGN-022
|
|
- [ ] 5 archivos nuevos creados en vision-general
|
|
- [ ] Todos los archivos tienen frontmatter SIMCO
|
|
- [ ] Todos los enlaces internos funcionan
|
|
|
|
### 5.2 Criterios Deseables (Should Have)
|
|
|
|
- [ ] Diagramas Mermaid renderizan correctamente
|
|
- [ ] Contenido no duplicado entre archivos
|
|
- [ ] Terminologia consistente
|
|
|
|
### 5.3 Criterios Opcionales (Nice to Have)
|
|
|
|
- [ ] Ejemplos de codigo en documentacion tecnica
|
|
- [ ] Links a documentacion externa de proveedores
|
|
|
|
---
|
|
|
|
## 6. RIESGOS Y MITIGACIONES
|
|
|
|
| Riesgo | Probabilidad | Impacto | Mitigacion |
|
|
|--------|--------------|---------|------------|
|
|
| Conflicto con archivos existentes | Baja | Alto | Verificar antes de modificar |
|
|
| Enlaces rotos | Media | Medio | Validacion automatica |
|
|
| Contenido duplicado | Media | Bajo | Revision cruzada |
|
|
| Inconsistencia de terminologia | Media | Medio | Glosario de terminos |
|
|
|
|
---
|
|
|
|
## 7. ROLLBACK PLAN
|
|
|
|
En caso de necesitar revertir los cambios:
|
|
|
|
1. Los archivos nuevos pueden eliminarse sin afectar funcionalidad existente
|
|
2. VISION-ERP-CORE.md original esta versionado en git
|
|
3. Ejecutar `git checkout HEAD~1 -- docs/00-vision-general/VISION-ERP-CORE.md` si es necesario
|
|
|
|
---
|
|
|
|
## 8. PROXIMOS PASOS
|
|
|
|
### 8.1 Siguiente Fase: Validacion de Planeacion
|
|
|
|
**Objetivo:** Validar que el plan cubre todos los gaps identificados
|
|
|
|
**Acciones:**
|
|
1. Comparar plan vs gaps de Fase 1
|
|
2. Verificar cobertura completa
|
|
3. Aprobar plan o identificar ajustes necesarios
|
|
|
|
---
|
|
|
|
**Documento generado:** 2026-01-10
|
|
**Fase:** 3 de 8 (Planeacion Basada en Analisis)
|
|
**Estado:** COMPLETADO
|
|
**Siguiente fase:** Validacion de Planeacion
|