- Update vision, architecture and technical documentation - Update module definitions (PMC-001 to PMC-008) - Update requirements documentation - Add CONTEXT-MAP.yml and ENVIRONMENT-INVENTORY.yml - Add orchestration guidelines and references 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
224 lines
7.1 KiB
Markdown
224 lines
7.1 KiB
Markdown
# Herencia de Directivas - Platform Marketing Content
|
|
|
|
**Version:** 1.0.0
|
|
**Fecha:** 2025-12-08
|
|
**Proyecto:** Platform Marketing Content (PMC)
|
|
**Nivel SIMCO:** NIVEL_2B (Proyecto Standalone)
|
|
|
|
---
|
|
|
|
## Proposito
|
|
|
|
Este documento define la jerarquia de directivas que aplican al proyecto PMC, desde el nivel workspace hasta el nivel proyecto especifico.
|
|
|
|
---
|
|
|
|
## Jerarquia de Herencia
|
|
|
|
```
|
|
WORKSPACE (core/orchestration/)
|
|
│
|
|
├── directivas/simco/ # Sistema de documentacion
|
|
├── directivas/principios/ # Principios fundamentales
|
|
├── templates/ # Templates base
|
|
└── agents/perfiles/ # Perfiles de agentes
|
|
│
|
|
▼
|
|
PROYECTO PMC (projects/platform_marketing_content/orchestration/)
|
|
│
|
|
├── directivas/ # Directivas especificas PMC
|
|
├── inventarios/ # Inventarios del proyecto
|
|
└── 00-guidelines/ # Guias locales
|
|
```
|
|
|
|
---
|
|
|
|
## 1. Directivas Heredadas del Workspace
|
|
|
|
### 1.1 Sistema SIMCO
|
|
|
|
| Directiva | Path | Aplicacion en PMC |
|
|
|-----------|------|-------------------|
|
|
| SIMCO-INICIALIZACION | core/orchestration/directivas/simco/ | Aplicar al crear nuevos subproyectos |
|
|
| SIMCO-CREAR | core/orchestration/directivas/simco/ | Creacion de entidades |
|
|
| SIMCO-MODIFICAR | core/orchestration/directivas/simco/ | Modificacion de codigo |
|
|
| SIMCO-VALIDAR | core/orchestration/directivas/simco/ | Validacion de cambios |
|
|
| SIMCO-DOCUMENTAR | core/orchestration/directivas/simco/ | Documentacion |
|
|
| SIMCO-NIVELES | core/orchestration/directivas/simco/ | PMC es NIVEL_2B |
|
|
| SIMCO-PROPAGACION | core/orchestration/directivas/simco/ | Propagacion de cambios |
|
|
|
|
### 1.2 Principios Fundamentales
|
|
|
|
| Principio | Path | Aplicacion en PMC |
|
|
|-----------|------|-------------------|
|
|
| PRINCIPIO-CAPVED | core/orchestration/directivas/principios/ | Ciclo de desarrollo |
|
|
| PRINCIPIO-DOC-PRIMERO | core/orchestration/directivas/principios/ | Documentar antes de implementar |
|
|
| PRINCIPIO-ANTI-DUPLICACION | core/orchestration/directivas/principios/ | Reutilizar catalogo |
|
|
| PRINCIPIO-VALIDACION-OBLIGATORIA | core/orchestration/directivas/principios/ | Validar cada cambio |
|
|
| PRINCIPIO-ECONOMIA-TOKENS | core/orchestration/directivas/principios/ | Optimizar contexto |
|
|
|
|
### 1.3 Perfiles de Agentes
|
|
|
|
| Perfil | Path | Uso en PMC |
|
|
|--------|------|------------|
|
|
| PERFIL-DATABASE | core/orchestration/agents/perfiles/ | DDL PostgreSQL |
|
|
| PERFIL-BACKEND | core/orchestration/agents/perfiles/ | NestJS implementation |
|
|
| PERFIL-FRONTEND | core/orchestration/agents/perfiles/ | React implementation |
|
|
| PERFIL-REQUIREMENTS-ANALYST | core/orchestration/agents/perfiles/ | Analisis de requerimientos |
|
|
| PERFIL-CODE-REVIEWER | core/orchestration/agents/perfiles/ | Code review |
|
|
|
|
---
|
|
|
|
## 2. Componentes del Catalogo Aplicables
|
|
|
|
PMC hereda y debe reutilizar los siguientes componentes del catalogo:
|
|
|
|
| Componente | Path | Modulo PMC | Uso |
|
|
|------------|------|------------|-----|
|
|
| @CATALOG_AUTH | shared/catalog/auth/ | PMC-007 | Autenticacion JWT |
|
|
| @CATALOG_SESSION | shared/catalog/session-management/ | PMC-007 | Gestion de sesiones |
|
|
| @CATALOG_TENANT | shared/catalog/multi-tenancy/ | PMC-001 | Multi-tenancy RLS |
|
|
| @CATALOG_RATELIMIT | shared/catalog/rate-limiting/ | PMC-004 | Limites de generacion |
|
|
| @CATALOG_NOTIFY | shared/catalog/notifications/ | PMC-005 | Notificaciones |
|
|
| @CATALOG_WS | shared/catalog/websocket/ | PMC-004 | WebSocket progreso |
|
|
| @CATALOG_PAYMENTS | shared/catalog/payments/ | PMC-001 | Billing (Fase 4) |
|
|
| @CATALOG_FLAGS | shared/catalog/feature-flags/ | PMC-007 | Feature toggles |
|
|
|
|
---
|
|
|
|
## 3. Directivas Especificas de PMC
|
|
|
|
Directivas creadas especificamente para el proyecto:
|
|
|
|
| Directiva | Path | Proposito |
|
|
|-----------|------|-----------|
|
|
| DIRECTIVA-ARQUITECTURA-MULTI-TENANT | orchestration/directivas/ | Estrategia multi-tenancy |
|
|
| GUIA-NOMENCLATURA-PMC | orchestration/directivas/ | Convenciones de naming |
|
|
|
|
---
|
|
|
|
## 4. Templates Aplicables
|
|
|
|
### 4.1 Templates Base (heredados)
|
|
|
|
```
|
|
core/orchestration/templates/
|
|
├── CONTEXTO-NIVEL-STANDALONE.md # Template para PMC (NIVEL_2B)
|
|
├── TEMPLATE-TAREA-CAPVED.md # Tareas con ciclo CAPVED
|
|
├── TEMPLATE-TAREA-TECNICA.md # Tareas tecnicas
|
|
├── TEMPLATE-HISTORIA-USUARIO.md # User stories
|
|
├── TEMPLATE-EPICA.md # Epicas
|
|
└── TEMPLATE-DELEGACION-SUBAGENTE.md # Delegacion de tareas
|
|
```
|
|
|
|
### 4.2 Uso de Templates
|
|
|
|
```yaml
|
|
# Para crear una tarea tecnica
|
|
usar: core/orchestration/templates/TEMPLATE-TAREA-TECNICA.md
|
|
contexto: orchestration/templates/CONTEXTO-PROYECTO-PMC.md
|
|
|
|
# Para crear una user story
|
|
usar: core/orchestration/templates/TEMPLATE-HISTORIA-USUARIO.md
|
|
modulo: docs/02-definicion-modulos/PMC-XXX-NOMBRE.md
|
|
```
|
|
|
|
---
|
|
|
|
## 5. Reglas de Herencia
|
|
|
|
### R1: Workspace sobre Proyecto
|
|
|
|
Las directivas del workspace tienen precedencia cuando hay conflicto:
|
|
|
|
```
|
|
core/orchestration/directivas/ > orchestration/directivas/
|
|
```
|
|
|
|
### R2: Catalogo Obligatorio
|
|
|
|
Si existe un componente en el catalogo que resuelve una necesidad, DEBE usarse:
|
|
|
|
```
|
|
# CORRECTO
|
|
Usar @CATALOG_AUTH para autenticacion
|
|
|
|
# INCORRECTO
|
|
Crear sistema de auth desde cero
|
|
```
|
|
|
|
### R3: Extension, No Duplicacion
|
|
|
|
Las directivas locales extienden, no reemplazan:
|
|
|
|
```yaml
|
|
# orchestration/directivas/GUIA-NOMENCLATURA-PMC.md
|
|
hereda_de: core/orchestration/directivas/ESTANDARES-NOMENCLATURA-BASE.md
|
|
extiende:
|
|
- Modulos PMC-XXX
|
|
- Schemas de BD especificos
|
|
- Workflows de generacion
|
|
```
|
|
|
|
### R4: Documentacion Antes de Codigo
|
|
|
|
Seguir PRINCIPIO-DOC-PRIMERO:
|
|
|
|
```
|
|
1. Definir en docs/02-definicion-modulos/
|
|
2. Especificar en docs/03-requerimientos/
|
|
3. Actualizar inventarios
|
|
4. Implementar codigo
|
|
```
|
|
|
|
---
|
|
|
|
## 6. Checklist de Validacion
|
|
|
|
Al crear/modificar funcionalidad, validar:
|
|
|
|
- [ ] Existe componente en catalogo que pueda reutilizarse?
|
|
- [ ] Se siguio el template correcto?
|
|
- [ ] Se actualizo el inventario correspondiente?
|
|
- [ ] La nomenclatura sigue GUIA-NOMENCLATURA-PMC?
|
|
- [ ] Si es multi-tenant, sigue DIRECTIVA-ARQUITECTURA-MULTI-TENANT?
|
|
- [ ] Se documento antes de implementar (DOC-PRIMERO)?
|
|
|
|
---
|
|
|
|
## 7. Proyectos de Inspiracion (Solo Referencia)
|
|
|
|
> **Nota:** Estos proyectos sirven como **inspiracion arquitectonica**, no como
|
|
> dependencias. Los patrones deben adaptarse a PMC y documentarse localmente.
|
|
> Para componentes reutilizables, usar siempre `shared/catalog/`.
|
|
|
|
| Proyecto | Patrones de Inspiracion |
|
|
|----------|------------------------|
|
|
| Multi-tenancy | Ver `shared/catalog/multi-tenancy/` |
|
|
| WebSocket/Colas | Ver `shared/catalog/websocket/` |
|
|
| Estructura modular | Ver `core/orchestration/templates/`|
|
|
|
|
---
|
|
|
|
## 8. Actualizacion de Este Documento
|
|
|
|
Actualizar cuando:
|
|
|
|
- Se agregue nuevo componente al catalogo usado por PMC
|
|
- Se cree nueva directiva especifica de PMC
|
|
- Cambie la estructura de orchestration
|
|
- Se agregue proyecto de referencia
|
|
|
|
---
|
|
|
|
## Referencias
|
|
|
|
- SIMCO Quick Reference: `core/orchestration/directivas/simco/SIMCO-QUICK-REFERENCE.md`
|
|
- Catalogo Index: `shared/catalog/CATALOG-INDEX.yml`
|
|
- Analisis Catalogo PMC: `docs/01-analisis-referencias/ANALISIS-CATALOGO.md`
|
|
|
|
---
|
|
|
|
**Generado por:** Requirements-Analyst
|
|
**Fecha:** 2025-12-08
|