- 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>
439 lines
14 KiB
Markdown
439 lines
14 KiB
Markdown
# FASE 5: ANALISIS DE DEPENDENCIAS ENTRE ARCHIVOS
|
|
|
|
**Proyecto:** template-saas
|
|
**Fecha:** 2026-01-10
|
|
**Estado:** COMPLETADO
|
|
**Perfil:** PERFIL-ORQUESTADOR
|
|
**Referencia:** FASE-4-VALIDACION-PLAN-VS-ANALISIS-2026-01-10.md
|
|
|
|
---
|
|
|
|
## 1. PROPOSITO
|
|
|
|
Identificar y documentar todas las dependencias entre archivos que seran modificados, para prevenir roturas de referencias y garantizar consistencia.
|
|
|
|
---
|
|
|
|
## 2. MAPA DE DEPENDENCIAS
|
|
|
|
### 2.1 Diagrama General
|
|
|
|
```
|
|
DIRECTIVAS SIMCO (workspace)
|
|
│
|
|
├── SIMCO-DOCUMENTACION-PROYECTO.md
|
|
│ └── Define estructura para:
|
|
│ ├── docs/_MAP.md
|
|
│ ├── docs/README.md (CREAR)
|
|
│ ├── orchestration/00-guidelines/*
|
|
│ └── orchestration/inventarios/*
|
|
│
|
|
├── SIMCO-NOMENCLATURA.md
|
|
│ └── Define nomenclatura para:
|
|
│ ├── SAAS-*.md
|
|
│ ├── INT-*.md
|
|
│ └── ADR-*.md
|
|
│
|
|
├── SIMCO-ESTRUCTURA-DOCS.md
|
|
│ └── Define estructura interna:
|
|
│ ├── Frontmatter YAML
|
|
│ ├── Secciones obligatorias
|
|
│ └── Footer
|
|
│
|
|
├── SIMCO-INVENTARIOS.md
|
|
│ └── Define estructura:
|
|
│ ├── MASTER_INVENTORY.yml
|
|
│ ├── DATABASE_INVENTORY.yml
|
|
│ ├── BACKEND_INVENTORY.yml
|
|
│ └── FRONTEND_INVENTORY.yml
|
|
│
|
|
└── SIMCO-INTEGRACIONES-EXTERNAS.md
|
|
└── Define estructura:
|
|
└── INT-*.md
|
|
```
|
|
|
|
### 2.2 Dependencias del Proyecto template-saas
|
|
|
|
```
|
|
HERENCIA-SIMCO.md (referencia directivas workspace)
|
|
│
|
|
├── Heredado por:
|
|
│ ├── MASTER_INVENTORY.yml
|
|
│ ├── DATABASE_INVENTORY.yml
|
|
│ ├── BACKEND_INVENTORY.yml
|
|
│ └── FRONTEND_INVENTORY.yml
|
|
│
|
|
└── Referencia a:
|
|
├── 7 directivas SIMCO
|
|
├── 3 checklists
|
|
└── 3 templates
|
|
|
|
CONTEXTO-PROYECTO.md
|
|
│
|
|
├── Referenciado desde:
|
|
│ ├── docs/_MAP.md
|
|
│ ├── PROJECT-STATUS.md
|
|
│ └── PROXIMA-ACCION.md
|
|
│
|
|
└── Define aliases para:
|
|
├── @DDL → apps/database/ddl/
|
|
├── @BACKEND → apps/backend/src/modules/
|
|
└── @FRONTEND → apps/frontend/src/portals/
|
|
|
|
docs/_MAP.md
|
|
│
|
|
├── Referencia a:
|
|
│ ├── SAAS-001 a SAAS-014
|
|
│ ├── INT-001 a INT-007
|
|
│ ├── ADR-001 a ADR-005
|
|
│ ├── orchestration/CONTEXT-MAP.yml
|
|
│ ├── orchestration/PROJECT-STATUS.md
|
|
│ └── orchestration/CONTEXTO-PROYECTO.md
|
|
│
|
|
└── Referenciado desde:
|
|
└── docs/README.md (CREAR)
|
|
```
|
|
|
|
---
|
|
|
|
## 3. MATRIZ DE REFERENCIAS CRUZADAS
|
|
|
|
### 3.1 Integraciones INT → Modulos SAAS
|
|
|
|
| Integracion | Modulo Relacionado | Tipo Referencia |
|
|
|-------------|-------------------|-----------------|
|
|
| INT-001-stripe | SAAS-004-billing | Bidireccional |
|
|
| INT-002-oauth | SAAS-001-auth | Bidireccional |
|
|
| INT-003-email | SAAS-013-email | Bidireccional |
|
|
| INT-004-push | SAAS-007-notifications | Bidireccional |
|
|
| INT-005-storage | SAAS-011-storage | Bidireccional |
|
|
| INT-006-webhooks | SAAS-010-webhooks | Bidireccional |
|
|
| INT-007-redis | SAAS-010-webhooks | Unidireccional |
|
|
|
|
**Impacto:** Al modificar INT-*, verificar que referencia a SAAS-* siga siendo valida.
|
|
|
|
### 3.2 ADRs → Modulos SAAS
|
|
|
|
| ADR | Modulos Relacionados | Tipo Referencia |
|
|
|-----|---------------------|-----------------|
|
|
| ADR-001 (RLS) | SAAS-002-tenants, SAAS-003-users | Conceptual |
|
|
| ADR-002 (Auth) | SAAS-001-auth | Conceptual |
|
|
| ADR-003 (Billing) | SAAS-004-billing | Conceptual |
|
|
| ADR-004 (Notif) | SAAS-007-notifications | Conceptual |
|
|
| ADR-005 (Flags) | SAAS-009-feature-flags | Conceptual |
|
|
|
|
**Impacto:** Bajo. ADRs no tienen links directos a modulos en su estructura actual.
|
|
|
|
### 3.3 Inventarios → Otros Inventarios
|
|
|
|
| Inventario | Depende de | Consistencia |
|
|
|------------|------------|--------------|
|
|
| DATABASE_INVENTORY | MASTER_INVENTORY (schemas count) | Verificar metricas |
|
|
| BACKEND_INVENTORY | MASTER_INVENTORY (modulos count) | Verificar metricas |
|
|
| FRONTEND_INVENTORY | MASTER_INVENTORY (paginas count) | Verificar metricas |
|
|
| MASTER_INVENTORY | Todos los anteriores | Consolidador |
|
|
|
|
**Impacto:** Al modificar estructura de inventarios, verificar que conteos en MASTER sean consistentes.
|
|
|
|
---
|
|
|
|
## 4. DEPENDENCIAS POR BLOQUE
|
|
|
|
### 4.1 Bloque 1: Integraciones
|
|
|
|
```
|
|
Archivos a modificar:
|
|
├── INT-001-stripe.md
|
|
│ └── Referencia: SAAS-004-billing.md
|
|
├── INT-002-oauth.md
|
|
│ └── Referencia: SAAS-001-auth.md
|
|
├── INT-003-email.md
|
|
│ └── Referencia: SAAS-013-email.md
|
|
├── INT-004-push.md
|
|
│ └── Referencia: SAAS-007-notifications.md
|
|
├── INT-005-storage.md
|
|
│ └── Referencia: SAAS-011-storage.md
|
|
├── INT-006-webhooks.md
|
|
│ └── Referencia: SAAS-010-webhooks.md
|
|
└── INT-007-redis.md
|
|
└── Referencia: SAAS-010-webhooks.md
|
|
|
|
Dependencias externas: Ninguna
|
|
Orden requerido: No (paralelo OK)
|
|
```
|
|
|
|
### 4.2 Bloque 2: ADRs
|
|
|
|
```
|
|
Archivos a modificar:
|
|
├── ADR-001-multi-tenancy-rls.md
|
|
├── ADR-002-authentication-jwt-oauth.md
|
|
├── ADR-003-billing-stripe.md
|
|
├── ADR-004-notifications-realtime.md
|
|
└── ADR-005-feature-flags.md
|
|
|
|
Referencias entre si: Ninguna actualmente
|
|
Dependencias externas: Ninguna
|
|
Orden requerido: No (paralelo OK)
|
|
```
|
|
|
|
### 4.3 Bloque 3: SAAS-013
|
|
|
|
```
|
|
Archivo a modificar:
|
|
└── SAAS-013-email.md
|
|
├── Referenciado desde: INT-003-email.md
|
|
└── Referencia a: SAAS-007-notifications.md
|
|
|
|
Dependencias:
|
|
- Ejecutar DESPUES de Bloque 1 (INT-003 debe existir)
|
|
- O ejecutar en paralelo y verificar links al final
|
|
```
|
|
|
|
### 4.4 Bloque 4: Inventarios
|
|
|
|
```
|
|
Archivos a modificar:
|
|
├── MASTER_INVENTORY.yml
|
|
│ └── Referenciado desde: DATABASE, BACKEND, FRONTEND
|
|
├── DATABASE_INVENTORY.yml
|
|
│ └── Referencia a: MASTER (conteos)
|
|
├── BACKEND_INVENTORY.yml
|
|
│ └── Referencia a: MASTER (conteos)
|
|
└── FRONTEND_INVENTORY.yml
|
|
└── Referencia a: MASTER (conteos)
|
|
|
|
Orden requerido:
|
|
1. Modificar MASTER primero (define estructura)
|
|
2. Luego DATABASE, BACKEND, FRONTEND (siguen estructura)
|
|
3. Validar consistencia de conteos
|
|
```
|
|
|
|
### 4.5 Bloque 5: Modulos SAAS
|
|
|
|
```
|
|
Archivos a modificar:
|
|
├── SAAS-001 a SAAS-012 (excepto 013)
|
|
└── SAAS-014
|
|
|
|
Dependencias:
|
|
- No hay dependencias entre modulos para frontmatter
|
|
- Solo actualizar fechas y agregar frontmatter
|
|
|
|
Orden requerido: No (paralelo OK)
|
|
```
|
|
|
|
---
|
|
|
|
## 5. VALIDACION DE LINKS
|
|
|
|
### 5.1 Links que deben verificarse post-ejecucion
|
|
|
|
| Origen | Destino | Validar |
|
|
|--------|---------|---------|
|
|
| docs/_MAP.md | orchestration/CONTEXTO-PROYECTO.md | Link funciona |
|
|
| docs/_MAP.md | orchestration/PROJECT-STATUS.md | Link funciona |
|
|
| docs/_MAP.md | orchestration/CONTEXT-MAP.yml | Link funciona |
|
|
| INT-001 | SAAS-004 | Link funciona |
|
|
| INT-002 | SAAS-001 | Link funciona |
|
|
| INT-003 | SAAS-013 | Link funciona |
|
|
| INT-004 | SAAS-007 | Link funciona |
|
|
| INT-005 | SAAS-011 | Link funciona |
|
|
| INT-006 | SAAS-010 | Link funciona |
|
|
| INT-007 | SAAS-010 | Link funciona |
|
|
|
|
### 5.2 Comando de Validacion
|
|
|
|
```bash
|
|
# Verificar links rotos en docs/
|
|
find projects/template-saas/docs -name "*.md" -exec grep -l "\]\(" {} \; | \
|
|
while read f; do
|
|
grep -oP '\]\([^)]+\)' "$f" | \
|
|
sed 's/\](\|)//g' | \
|
|
while read link; do
|
|
if [[ ! -f "$(dirname $f)/$link" ]]; then
|
|
echo "ROTO: $f -> $link"
|
|
fi
|
|
done
|
|
done
|
|
```
|
|
|
|
---
|
|
|
|
## 6. ARCHIVOS NUEVOS Y DEPENDENCIAS
|
|
|
|
### 6.1 docs/README.md
|
|
|
|
```
|
|
Dependencias salientes:
|
|
├── docs/_MAP.md (link)
|
|
├── docs/00-vision-general/README.md (link)
|
|
├── docs/01-modulos/_INDEX.md (link)
|
|
├── docs/02-integraciones/ (link)
|
|
├── docs/architecture/adr/_INDEX.md (link)
|
|
├── orchestration/00-guidelines/CONTEXTO-PROYECTO.md (link)
|
|
├── orchestration/PROJECT-STATUS.md (link)
|
|
└── orchestration/00-guidelines/HERENCIA-SIMCO.md (link)
|
|
|
|
Prerequisito: Todos los archivos referenciados deben existir
|
|
```
|
|
|
|
### 6.2 orchestration/README.md
|
|
|
|
```
|
|
Dependencias salientes:
|
|
├── orchestration/00-guidelines/ (link)
|
|
├── orchestration/analisis/ (link)
|
|
├── orchestration/inventarios/ (link)
|
|
├── orchestration/planes/ (link)
|
|
├── orchestration/trazas/ (link)
|
|
├── CONTEXT-MAP.yml (link)
|
|
├── PROJECT-STATUS.md (link)
|
|
└── PROXIMA-ACCION.md (link)
|
|
|
|
Prerequisito: Todos los archivos referenciados ya existen
|
|
```
|
|
|
|
### 6.3 _MAP.md para subdirectorios
|
|
|
|
```
|
|
docs/02-integraciones/_MAP.md
|
|
├── Lista: INT-001 a INT-007
|
|
└── Prerequisito: Integraciones deben estar modificadas
|
|
|
|
docs/02-especificaciones/_MAP.md
|
|
├── Lista: ET-* archivos existentes
|
|
└── Prerequisito: Ninguno
|
|
|
|
docs/02-devops/_MAP.md
|
|
├── Lista: CICD-GUIDE.md
|
|
└── Prerequisito: Ninguno
|
|
```
|
|
|
|
---
|
|
|
|
## 7. ORDEN OPTIMO DE EJECUCION
|
|
|
|
### 7.1 Secuencia Recomendada
|
|
|
|
```
|
|
FASE 1 (Paralelo):
|
|
├── Bloque 1: INT (7 archivos) ─┐
|
|
├── Bloque 2: ADR (5 archivos) ─┼── Paralelo OK
|
|
└── Bloque 5: SAAS (13 archivos)┘
|
|
|
|
FASE 2 (Secuencial):
|
|
├── Bloque 3: SAAS-013 (1 archivo) ── Despues de validar INT-003
|
|
└── Bloque 4: Inventarios (4 archivos) ── En orden:
|
|
├── 1. MASTER_INVENTORY.yml
|
|
├── 2. DATABASE_INVENTORY.yml
|
|
├── 3. BACKEND_INVENTORY.yml
|
|
└── 4. FRONTEND_INVENTORY.yml
|
|
|
|
FASE 3 (Final):
|
|
└── Archivos nuevos (5 archivos):
|
|
├── docs/README.md
|
|
├── orchestration/README.md
|
|
├── docs/02-integraciones/_MAP.md
|
|
├── docs/02-especificaciones/_MAP.md
|
|
└── docs/02-devops/_MAP.md
|
|
```
|
|
|
|
### 7.2 Diagrama de Flujo
|
|
|
|
```
|
|
┌─────────────────────────────────────────────────────────────────┐
|
|
│ INICIO │
|
|
└─────────────────────────────────────────────────────────────────┘
|
|
│
|
|
┌────────────────────┼────────────────────┐
|
|
│ │ │
|
|
▼ ▼ ▼
|
|
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
│ BLOQUE 1 │ │ BLOQUE 2 │ │ BLOQUE 5 │
|
|
│ INT │ │ ADR │ │ SAAS │
|
|
│ (7 arch) │ │ (5 arch) │ │ (13 arch) │
|
|
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
|
|
│ │ │
|
|
└────────────────────┼────────────────────┘
|
|
│
|
|
▼
|
|
┌───────────────────────┐
|
|
│ VALIDACION │
|
|
│ Links cruzados │
|
|
└───────────┬───────────┘
|
|
│
|
|
▼
|
|
┌────────────────────────┐
|
|
│ BLOQUE 3 │
|
|
│ SAAS-013 │
|
|
└────────────┬───────────┘
|
|
│
|
|
▼
|
|
┌────────────────────────┐
|
|
│ BLOQUE 4 │
|
|
│ INVENTARIOS │
|
|
│ (orden secuencial) │
|
|
└────────────┬───────────┘
|
|
│
|
|
▼
|
|
┌────────────────────────┐
|
|
│ ARCHIVOS NUEVOS │
|
|
│ README, _MAP │
|
|
└────────────┬───────────┘
|
|
│
|
|
▼
|
|
┌────────────────────────┐
|
|
│ VALIDACION FINAL │
|
|
│ todos los links │
|
|
└────────────────────────┘
|
|
```
|
|
|
|
---
|
|
|
|
## 8. RIESGOS DE DEPENDENCIAS
|
|
|
|
### 8.1 Riesgos Identificados
|
|
|
|
| Riesgo | Probabilidad | Impacto | Mitigacion |
|
|
|--------|--------------|---------|------------|
|
|
| Link roto INT→SAAS | Media | Medio | Validar links post-ejecucion |
|
|
| Inconsistencia inventarios | Baja | Alto | Ejecutar MASTER primero |
|
|
| Referencia a archivo faltante | Baja | Medio | Crear archivos antes de referenciar |
|
|
| Conflicto de merge | Baja | Medio | Trabajar en rama separada |
|
|
|
|
### 8.2 Checklist Pre-Ejecucion
|
|
|
|
- [ ] Crear rama de trabajo `feature/estandarizacion-simco`
|
|
- [ ] Verificar que todos los archivos existen
|
|
- [ ] Verificar que no hay cambios pendientes en archivos a modificar
|
|
- [ ] Tener backup de archivos originales
|
|
|
|
---
|
|
|
|
## 9. CONCLUSION
|
|
|
|
### 9.1 Resumen de Dependencias
|
|
|
|
| Tipo | Cantidad | Complejidad |
|
|
|------|----------|-------------|
|
|
| Dependencias internas | 12 | Media |
|
|
| Dependencias externas | 0 | N/A |
|
|
| Links a validar | 10+ | Baja |
|
|
| Orden critico | 2 bloques | Baja |
|
|
|
|
### 9.2 Recomendaciones
|
|
|
|
1. Ejecutar Bloques 1, 2, 5 en paralelo
|
|
2. Validar links antes de Bloque 3
|
|
3. Ejecutar Bloque 4 en orden (MASTER primero)
|
|
4. Crear archivos nuevos al final
|
|
5. Validar todos los links al terminar
|
|
|
|
---
|
|
|
|
**Creado:** 2026-01-10
|
|
**Autor:** Agente Orquestador
|
|
**Sistema:** SIMCO v3.7
|
|
**Siguiente Fase:** FASE 6 - Refinamiento del Plan
|