- Rename _archivo to _archive (standard convention) - Move analisis/, planes/ to _archive/ - Archive extra root files - Update _MAP.md with standardized structure Standard: SIMCO-ESTANDAR-ORCHESTRATION v1.0.0 Level: PROVIDER (L1A) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
441 lines
12 KiB
Markdown
441 lines
12 KiB
Markdown
# FASE 3: PLAN DE ESTANDARIZACION - DOCUMENTACION SIMCO v3.7
|
|
|
|
**Proyecto:** template-saas
|
|
**Fecha:** 2026-01-10
|
|
**Estado:** COMPLETADO
|
|
**Perfil:** PERFIL-ORQUESTADOR
|
|
**Referencia:** FASE-2-ANALISIS-DETALLADO-ESTANDARIZACION-2026-01-10.md
|
|
|
|
---
|
|
|
|
## 1. RESUMEN DEL PLAN
|
|
|
|
### 1.1 Objetivo
|
|
|
|
Corregir los 17 gaps identificados en la FASE 2 para elevar el cumplimiento SIMCO de 59% a 95%+.
|
|
|
|
### 1.2 Alcance
|
|
|
|
| Grupo | Archivos | Gaps | Objetivo |
|
|
|-------|----------|------|----------|
|
|
| Integraciones INT | 7 | 6 P0 | 19% → 90% |
|
|
| ADRs | 5 | 3 P0 | 60% → 95% |
|
|
| SAAS-013 Email | 1 | 1 P0 | 75% → 95% |
|
|
| Inventarios YAML | 4 | 4 P1 | 70% → 90% |
|
|
| Modulos SAAS | 13 | 3 P1/P2 | 88% → 95% |
|
|
| **TOTAL** | **30** | **17** | **59% → 95%** |
|
|
|
|
---
|
|
|
|
## 2. BLOQUES DE EJECUCION
|
|
|
|
### BLOQUE 1: INTEGRACIONES INT (P0 - CRITICO)
|
|
|
|
**Objetivo:** Reestructurar 7 integraciones para cumplir SIMCO-INTEGRACIONES-EXTERNAS.md
|
|
|
|
#### Tareas por Archivo
|
|
|
|
| # | Archivo | Tareas |
|
|
|---|---------|--------|
|
|
| 1.1 | INT-001-stripe.md | Agregar: tabla metadata, endpoints, rate limits, errores, multi-tenant, testing, monitoreo |
|
|
| 1.2 | INT-002-oauth.md | Agregar: tabla metadata, endpoints, rate limits, errores, multi-tenant, testing, monitoreo |
|
|
| 1.3 | INT-003-email.md | Agregar: tabla metadata, rate limits, errores, multi-tenant, testing, monitoreo |
|
|
| 1.4 | INT-004-push.md | Agregar: tabla metadata, rate limits, errores, multi-tenant, testing, monitoreo |
|
|
| 1.5 | INT-005-storage.md | Agregar: tabla metadata, endpoints, rate limits, errores, multi-tenant, testing, monitoreo |
|
|
| 1.6 | INT-006-webhooks.md | Agregar: tabla metadata, rate limits, testing, monitoreo |
|
|
| 1.7 | INT-007-redis.md | Agregar: tabla metadata, rate limits, errores, multi-tenant, testing, monitoreo |
|
|
|
|
#### Template a Aplicar
|
|
|
|
```markdown
|
|
# INT-{NNN}: {Nombre Integracion}
|
|
|
|
## Metadata
|
|
| Campo | Valor |
|
|
|-------|-------|
|
|
| Codigo | INT-{NNN} |
|
|
| Proveedor | {Nombre proveedor} |
|
|
| Tipo | {Pagos|Auth|Notificaciones|Storage|etc} |
|
|
| Estado | {Implementado|Documentado|Pendiente} |
|
|
| Multi-tenant | {Si|No} |
|
|
| Fecha integracion | {YYYY-MM-DD} |
|
|
|
|
---
|
|
|
|
## Descripcion
|
|
{Parrafo descriptivo del proposito}
|
|
|
|
## Credenciales Requeridas
|
|
| Variable de Entorno | Descripcion | Obligatorio |
|
|
|---------------------|-------------|-------------|
|
|
| {PROVIDER}_API_KEY | API Key principal | SI |
|
|
|
|
## Endpoints/SDK Utilizados
|
|
| Operacion | Endpoint/Metodo | Descripcion |
|
|
|-----------|-----------------|-------------|
|
|
| {operacion} | {endpoint} | {descripcion} |
|
|
|
|
## Rate Limits
|
|
| Limite | Valor | Accion si excede |
|
|
|--------|-------|------------------|
|
|
| Requests/min | {N} | Retry con backoff |
|
|
|
|
## Manejo de Errores
|
|
| Codigo | Descripcion | Accion |
|
|
|--------|-------------|--------|
|
|
| 400 | Bad Request | Log + no retry |
|
|
| 429 | Rate Limited | Backoff exponencial |
|
|
|
|
## Fallbacks
|
|
- {Estrategia si servicio no disponible}
|
|
|
|
## Multi-tenant
|
|
- Credenciales: {por tenant|globales}
|
|
- Configuracion: {por tenant|global}
|
|
|
|
## Testing
|
|
### Sandbox/Test Mode
|
|
{Como probar sin afectar produccion}
|
|
|
|
## Monitoreo
|
|
| Metrica | Descripcion | Alerta |
|
|
|---------|-------------|--------|
|
|
| Latencia | Tiempo de respuesta | >2s |
|
|
|
|
## Referencias
|
|
- [Documentacion oficial]({url})
|
|
- [Modulo relacionado](../01-modulos/SAAS-XXX.md)
|
|
|
|
---
|
|
|
|
**Ultima actualizacion:** {YYYY-MM-DD}
|
|
```
|
|
|
|
---
|
|
|
|
### BLOQUE 2: ADRs (P0 - CRITICO)
|
|
|
|
**Objetivo:** Agregar tabla metadata formal y footer a 5 ADRs
|
|
|
|
#### Tareas por Archivo
|
|
|
|
| # | Archivo | Tareas |
|
|
|---|---------|--------|
|
|
| 2.1 | ADR-001-multi-tenancy-rls.md | Agregar tabla metadata, cambiar estado a ingles, agregar footer |
|
|
| 2.2 | ADR-002-authentication-jwt-oauth.md | Agregar tabla metadata, cambiar estado a ingles, agregar footer |
|
|
| 2.3 | ADR-003-billing-stripe.md | Agregar tabla metadata, cambiar estado a ingles, agregar footer |
|
|
| 2.4 | ADR-004-notifications-realtime.md | Agregar tabla metadata, cambiar estado a ingles, agregar footer |
|
|
| 2.5 | ADR-005-feature-flags.md | Agregar tabla metadata, cambiar estado a ingles, agregar footer |
|
|
|
|
#### Cambios Requeridos
|
|
|
|
**Reemplazar:**
|
|
```markdown
|
|
## Estado
|
|
**Aceptado** - 2026-01-10
|
|
```
|
|
|
|
**Por:**
|
|
```markdown
|
|
## Metadata
|
|
| Campo | Valor |
|
|
|-------|-------|
|
|
| ID | ADR-{NNNN} |
|
|
| Estado | Accepted |
|
|
| Fecha | 2026-01-10 |
|
|
| Supersede | N/A |
|
|
```
|
|
|
|
**Agregar al final:**
|
|
```markdown
|
|
---
|
|
|
|
**Fecha decision:** 2026-01-10
|
|
**Autores:** Claude Code (Arquitectura)
|
|
```
|
|
|
|
---
|
|
|
|
### BLOQUE 3: SAAS-013 EMAIL (P0 - CRITICO)
|
|
|
|
**Objetivo:** Reestructurar siguiendo patron SAAS-014
|
|
|
|
#### Tareas
|
|
|
|
| # | Tarea | Detalle |
|
|
|---|-------|---------|
|
|
| 3.1 | Crear tabla metadata | Codigo, Modulo, Prioridad, Estado, Fase |
|
|
| 3.2 | Agregar seccion Descripcion | Parrafo formal |
|
|
| 3.3 | Agregar seccion Objetivos | Lista numerada |
|
|
| 3.4 | Agregar seccion Alcance | Incluido/Excluido |
|
|
| 3.5 | Reorganizar contenido existente | Bajo secciones SIMCO |
|
|
| 3.6 | Agregar footer | Fecha, version, autor |
|
|
|
|
---
|
|
|
|
### BLOQUE 4: INVENTARIOS YAML (P1)
|
|
|
|
**Objetivo:** Reestructurar metadata y completar datos faltantes
|
|
|
|
#### Tareas por Archivo
|
|
|
|
| # | Archivo | Tareas |
|
|
|---|---------|--------|
|
|
| 4.1 | MASTER_INVENTORY.yml | Crear seccion metadata:, agregar seccion epicas:, renombrar progreso a resumen |
|
|
| 4.2 | DATABASE_INVENTORY.yml | Crear seccion metadata:, llenar migraciones reales, agregar total_indices |
|
|
| 4.3 | BACKEND_INVENTORY.yml | Crear seccion metadata: |
|
|
| 4.4 | FRONTEND_INVENTORY.yml | Crear seccion metadata:, renombrar metricas a resumen |
|
|
|
|
#### Estructura Metadata Requerida
|
|
|
|
```yaml
|
|
metadata:
|
|
proyecto: "template-saas"
|
|
tipo: "{MASTER|DATABASE|BACKEND|FRONTEND}"
|
|
version: "{SEMVER}"
|
|
updated: "{YYYY-MM-DD}"
|
|
# Campos adicionales por tipo:
|
|
# DATABASE: motor, version_motor
|
|
# BACKEND: framework, orm, testing
|
|
# FRONTEND: framework, styling, state
|
|
```
|
|
|
|
---
|
|
|
|
### BLOQUE 5: MODULOS SAAS RESTANTES (P1/P2)
|
|
|
|
**Objetivo:** Agregar frontmatter YAML y actualizar fechas
|
|
|
|
#### 5.1 Agregar Frontmatter (13 archivos)
|
|
|
|
**Template frontmatter:**
|
|
```yaml
|
|
---
|
|
id: "SAAS-{NNN}"
|
|
title: "{Titulo descriptivo}"
|
|
type: "Module"
|
|
status: "{Draft|InReview|Approved|Published|Deprecated}"
|
|
priority: "{P0|P1|P2|P3}"
|
|
module: "{nombre_modulo}"
|
|
version: "1.0.0"
|
|
created_date: "2026-01-07"
|
|
updated_date: "2026-01-10"
|
|
---
|
|
```
|
|
|
|
#### 5.2 Actualizar Fechas (5 archivos)
|
|
|
|
| Archivo | Fecha Actual | Nueva Fecha |
|
|
|---------|--------------|-------------|
|
|
| SAAS-005-plans.md | 2026-01-07 | 2026-01-10 |
|
|
| SAAS-008-audit-logs.md | 2026-01-07 | 2026-01-10 |
|
|
| SAAS-009-feature-flags.md | 2026-01-07 | 2026-01-10 |
|
|
| SAAS-010-webhooks.md | 2026-01-07 | 2026-01-10 |
|
|
| SAAS-011-storage.md | 2026-01-07 | 2026-01-10 |
|
|
|
|
#### 5.3 Marcar Criterios de Aceptacion (2 archivos)
|
|
|
|
| Archivo | Criterios | Accion |
|
|
|---------|-----------|--------|
|
|
| SAAS-008-audit-logs.md | 5/6 sin marcar | Marcar [x] todos |
|
|
| SAAS-009-feature-flags.md | 0/6 sin marcar | Marcar [x] todos |
|
|
|
|
---
|
|
|
|
## 3. ARCHIVOS ADICIONALES A CREAR
|
|
|
|
### 3.1 docs/README.md (OBLIGATORIO - FALTANTE)
|
|
|
|
```markdown
|
|
# Template SaaS - Documentacion
|
|
|
|
**Proyecto:** template-saas
|
|
**Version:** 1.0.0
|
|
**Estado:** Release Candidate
|
|
|
|
---
|
|
|
|
## Descripcion
|
|
|
|
Template base para desarrollo de plataformas SaaS multi-tenant con:
|
|
- Autenticacion JWT + OAuth
|
|
- Multi-tenancy con PostgreSQL RLS
|
|
- Billing con Stripe
|
|
- Notificaciones multicanal
|
|
- Feature Flags por tenant/plan
|
|
- Integracion IA multi-proveedor
|
|
|
|
## Navegacion
|
|
|
|
- [Mapa de Documentacion](./_MAP.md)
|
|
- [Vision General](./00-vision-general/README.md)
|
|
- [Modulos](./01-modulos/_INDEX.md)
|
|
- [Integraciones](./02-integraciones/)
|
|
- [ADRs](./architecture/adr/_INDEX.md)
|
|
|
|
## Referencias
|
|
|
|
- [Contexto del Proyecto](../orchestration/00-guidelines/CONTEXTO-PROYECTO.md)
|
|
- [Estado del Proyecto](../orchestration/PROJECT-STATUS.md)
|
|
- [Herencia SIMCO](../orchestration/00-guidelines/HERENCIA-SIMCO.md)
|
|
|
|
---
|
|
|
|
**Ultima actualizacion:** 2026-01-10
|
|
```
|
|
|
|
### 3.2 orchestration/README.md (RECOMENDADO)
|
|
|
|
```markdown
|
|
# Orchestration - Template SaaS
|
|
|
|
**Proposito:** Carpeta de orquestacion para agentes IA y gestion del proyecto.
|
|
|
|
## Contenido
|
|
|
|
| Directorio | Descripcion |
|
|
|------------|-------------|
|
|
| 00-guidelines/ | Contexto y herencia SIMCO |
|
|
| analisis/ | Documentos de analisis y validacion |
|
|
| inventarios/ | Inventarios YAML (SSOT) |
|
|
| planes/ | Historico de sprints |
|
|
| trazas/ | Trazas de ejecucion |
|
|
|
|
## Archivos Principales
|
|
|
|
- `CONTEXT-MAP.yml` - Mapeo de contexto del proyecto
|
|
- `PROJECT-STATUS.md` - Estado actual
|
|
- `PROXIMA-ACCION.md` - Siguiente paso
|
|
|
|
---
|
|
|
|
**Ultima actualizacion:** 2026-01-10
|
|
```
|
|
|
|
### 3.3 _MAP.md faltantes (3 archivos)
|
|
|
|
| Ubicacion | Proposito |
|
|
|-----------|-----------|
|
|
| docs/02-integraciones/_MAP.md | Indice de integraciones |
|
|
| docs/02-especificaciones/_MAP.md | Indice de especificaciones |
|
|
| docs/02-devops/_MAP.md | Indice de devops |
|
|
|
|
---
|
|
|
|
## 4. CRONOGRAMA DE EJECUCION
|
|
|
|
### Fase de Ejecucion
|
|
|
|
| Bloque | Prioridad | Archivos | Orden |
|
|
|--------|-----------|----------|-------|
|
|
| Bloque 1: Integraciones | P0 | 7 | 1ro |
|
|
| Bloque 2: ADRs | P0 | 5 | 2do |
|
|
| Bloque 3: SAAS-013 | P0 | 1 | 3ro |
|
|
| Bloque 4: Inventarios | P1 | 4 | 4to |
|
|
| Bloque 5: Modulos SAAS | P1/P2 | 13 | 5to |
|
|
| Archivos nuevos | P1 | 5 | 6to |
|
|
|
|
### Total de Cambios
|
|
|
|
| Tipo | Cantidad |
|
|
|------|----------|
|
|
| Archivos a modificar | 30 |
|
|
| Archivos a crear | 5 |
|
|
| Gaps a resolver | 17 |
|
|
| **Total operaciones** | **35** |
|
|
|
|
---
|
|
|
|
## 5. VALIDACIONES POST-EJECUCION
|
|
|
|
### 5.1 Checklist de Validacion por Bloque
|
|
|
|
#### Bloque 1: Integraciones
|
|
- [ ] Todas tienen tabla metadata
|
|
- [ ] Todas tienen rate limits documentados
|
|
- [ ] Todas tienen manejo de errores
|
|
- [ ] Todas tienen seccion multi-tenant
|
|
- [ ] Todas tienen seccion testing
|
|
- [ ] Todas tienen seccion monitoreo
|
|
|
|
#### Bloque 2: ADRs
|
|
- [ ] Todos tienen tabla metadata formal
|
|
- [ ] Todos tienen estado en ingles
|
|
- [ ] Todos tienen footer con fecha y autores
|
|
|
|
#### Bloque 3: SAAS-013
|
|
- [ ] Tiene tabla metadata
|
|
- [ ] Tiene secciones Descripcion, Objetivos, Alcance
|
|
- [ ] Tiene footer
|
|
|
|
#### Bloque 4: Inventarios
|
|
- [ ] Todos tienen seccion metadata:
|
|
- [ ] DATABASE tiene migraciones reales
|
|
- [ ] MASTER tiene seccion epicas:
|
|
|
|
#### Bloque 5: Modulos SAAS
|
|
- [ ] Fechas actualizadas
|
|
- [ ] Criterios de aceptacion marcados
|
|
|
|
### 5.2 Metricas Objetivo
|
|
|
|
| Grupo | Antes | Objetivo | Metrica |
|
|
|-------|-------|----------|---------|
|
|
| Integraciones | 19% | 90% | +71pp |
|
|
| ADRs | 60% | 95% | +35pp |
|
|
| SAAS-013 | 75% | 95% | +20pp |
|
|
| Inventarios | 70% | 90% | +20pp |
|
|
| Modulos SAAS | 88% | 95% | +7pp |
|
|
| **PROMEDIO** | **59%** | **95%** | **+36pp** |
|
|
|
|
---
|
|
|
|
## 6. RIESGOS Y MITIGACIONES
|
|
|
|
| Riesgo | Probabilidad | Impacto | Mitigacion |
|
|
|--------|--------------|---------|------------|
|
|
| Cambios rompen referencias | Media | Alto | Validar links despues de cambios |
|
|
| Inconsistencia entre archivos | Media | Medio | Usar templates estandarizados |
|
|
| Perdida de contenido | Baja | Alto | No eliminar, solo reorganizar |
|
|
| Conflictos git | Baja | Medio | Trabajar en rama separada |
|
|
|
|
---
|
|
|
|
## 7. DEPENDENCIAS DEL PLAN
|
|
|
|
### 7.1 Pre-requisitos
|
|
|
|
- [x] FASE 1 completada
|
|
- [x] FASE 2 completada
|
|
- [x] Gaps identificados y priorizados
|
|
- [ ] Plan validado (FASE 4)
|
|
|
|
### 7.2 Archivos de Referencia
|
|
|
|
| Archivo | Proposito |
|
|
|---------|-----------|
|
|
| SIMCO-DOCUMENTACION-PROYECTO.md | Estructura base |
|
|
| SIMCO-NOMENCLATURA.md | Patrones de nombres |
|
|
| SIMCO-ESTRUCTURA-DOCS.md | Estructura interna |
|
|
| SIMCO-INVENTARIOS.md | Formato inventarios |
|
|
| SIMCO-INTEGRACIONES-EXTERNAS.md | Template integraciones |
|
|
| TEMPLATE-INTEGRACION-EXTERNA.md | Template completo |
|
|
| CHECKLIST-DOCUMENTACION-PROYECTO.md | Validacion docs |
|
|
| CHECKLIST-INVENTARIOS.md | Validacion inventarios |
|
|
| CHECKLIST-NOMENCLATURA.md | Validacion nombres |
|
|
|
|
---
|
|
|
|
## 8. RESUMEN
|
|
|
|
Este plan define las acciones para corregir 17 gaps en 30 archivos, creando 5 archivos nuevos. La ejecucion se divide en 6 bloques priorizados por criticidad (P0 primero).
|
|
|
|
**Objetivo final:** Elevar el cumplimiento SIMCO de 59% a 95%+.
|
|
|
|
---
|
|
|
|
**Creado:** 2026-01-10
|
|
**Autor:** Agente Orquestador
|
|
**Sistema:** SIMCO v3.7
|
|
**Siguiente Fase:** FASE 4 - Validacion del Plan contra el Analisis
|