miinventario-v2/orchestration/00-guidelines/HERENCIA-SIMCO.md
rckrdmrd 1a53b5c4d3 [MIINVENTARIO] feat: Initial commit - Sistema de inventario con análisis de video IA
- Backend NestJS con módulos de autenticación, inventario, créditos
- Frontend React con dashboard y componentes UI
- Base de datos PostgreSQL con migraciones
- Tests E2E configurados
- Configuración de Docker y deployment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 02:25:48 -06:00

178 lines
4.9 KiB
Markdown

# MiInventario - Herencia SIMCO
## Informacion de Herencia
| Campo | Valor |
|-------|-------|
| **Proyecto** | MiInventario |
| **Codigo** | MII |
| **Version SIMCO** | 4.0.0 |
| **Nivel** | L2-A (Standalone) |
| **Hereda de** | workspace-v2/orchestration |
| **Actualizado** | 2026-01-10 |
---
## Directivas Heredadas del Workspace
### 6 Principios Fundamentales
| Principio | Archivo | Descripcion |
|-----------|---------|-------------|
| CAPVED | PRINCIPIO-CAPVED.md | Ciclo de vida de tareas |
| Doc-Primero | PRINCIPIO-DOC-PRIMERO.md | Documentacion antes de codigo |
| Anti-Duplicacion | PRINCIPIO-ANTI-DUPLICACION.md | Verificar catalogo antes de crear |
| Validacion-Obligatoria | PRINCIPIO-VALIDACION-OBLIGATORIA.md | Build/lint obligatorio |
| Economia-Tokens | PRINCIPIO-ECONOMIA-TOKENS.md | Desglose en subtareas |
| No-Asumir | PRINCIPIO-NO-ASUMIR.md | Preguntar si falta info |
### Directivas SIMCO Aplicables
| Directiva | Proposito |
|-----------|-----------|
| SIMCO-TAREA.md | Ciclo CAPVED completo |
| SIMCO-CREAR.md | Crear archivos |
| SIMCO-MODIFICAR.md | Modificar archivos |
| SIMCO-VALIDAR.md | Validar codigo |
| SIMCO-DOCUMENTAR.md | Documentar trabajo |
| SIMCO-BUSCAR.md | Buscar informacion |
| SIMCO-DDL.md | Operaciones PostgreSQL |
| SIMCO-BACKEND.md | Operaciones NestJS |
| SIMCO-FRONTEND.md | Operaciones React/RN |
| SIMCO-INVENTARIOS.md | Gestionar inventarios |
| SIMCO-ESTRUCTURA-DOCS.md | Estructura de documentacion |
| SIMCO-INTEGRACIONES-EXTERNAS.md | Integraciones externas |
---
## Rutas de Referencia
```yaml
@WORKSPACE: /home/isem/workspace-v2
@SIMCO: @WORKSPACE/orchestration/directivas/simco
@PRINCIPIOS: @WORKSPACE/orchestration/directivas/principios
@TEMPLATES: @WORKSPACE/orchestration/templates
@CATALOG: @WORKSPACE/shared/catalog
@KNOWLEDGE: @WORKSPACE/shared/knowledge-base
```
---
## Catalogo Reutilizable
| Funcionalidad | Ruta en Catalogo | Aplicabilidad | Accion |
|---------------|------------------|---------------|--------|
| auth | /shared/catalog/auth/ | Alta | Reutilizar patron JWT+Passport |
| multi-tenancy | /shared/catalog/multi-tenancy/ | Alta | Reutilizar RLS |
| payments | /shared/catalog/payments/ | Media | Adaptar para Mexico |
| notifications | /shared/catalog/notifications/ | Alta | Reutilizar Firebase |
| rate-limiting | /shared/catalog/rate-limiting/ | Alta | Reutilizar |
| audit-logs | /shared/catalog/audit-logs/ | Alta | Reutilizar |
| session-management | /shared/catalog/session-management/ | Alta | Reutilizar |
| websocket | /shared/catalog/websocket/ | Media | Para notificaciones RT |
---
## Proceso de Desarrollo
### Ciclo CAPVED
```
C - Contexto
└── Vincular a CONTEXTO-PROYECTO.md
└── Identificar modulo/epica afectada
A - Analisis
└── Mapear impacto y dependencias
└── Verificar catalogo (@CATALOG)
└── Identificar riesgos
P - Planeacion
└── Desglosar en subtareas
└── Estimar story points
└── Identificar orden de ejecucion
V - Validacion (Gate)
└── Verificar analisis completo
└── Aprobar plan antes de ejecutar
E - Ejecucion
└── Implementar segun plan
└── Seguir directivas especificas (DDL, Backend, Frontend)
D - Documentacion
└── Actualizar inventarios
└── Registrar en trazas
└── Actualizar estado
```
### Metodologia
| Aspecto | Valor |
|---------|-------|
| Framework | SCRUM adaptado |
| Sprints | 1-2 semanas |
| Documentacion | SIMCO v4.0.0 |
| Versionado | Semver |
| Branching | Git Flow |
---
## Validaciones Obligatorias
### Antes de Crear Codigo
- [ ] Verificar si funcionalidad existe en @CATALOG
- [ ] Revisar templates en @TEMPLATES
- [ ] Leer directiva SIMCO correspondiente
### Antes de Commit
- [ ] Build exitoso
- [ ] Lint sin errores
- [ ] Tests pasan
- [ ] Documentacion actualizada
### Antes de Merge
- [ ] Code review
- [ ] Inventarios actualizados
- [ ] Traza registrada
---
## Extensiones Especificas del Proyecto
### Funcionalidades Nuevas (No en Catalogo)
1. **Video Processing** - Captura y upload de video
2. **AI Provider Abstraction** - Capa multi-proveedor IA
3. **Credits/Tokens System** - Wallet con creditos
4. **Mexican Payments** - OXXO + 7-Eleven
5. **Referral Engine** - Referidos multinivel
### Candidatas a Propagar al Catalogo
Una vez implementadas y estabilizadas, estas funcionalidades pueden agregarse al catalogo compartido para reutilizacion en otros proyectos.
---
## Referencias
### Workspace
- [Indice de Directivas](/home/isem/workspace-v2/orchestration/INDICE-DIRECTIVAS-WORKSPACE.yml)
- [Catalogo Index](/home/isem/workspace-v2/shared/catalog/CATALOG-INDEX.yml)
- [Knowledge Base](/home/isem/workspace-v2/shared/knowledge-base/)
### Proyecto
- [Contexto del Proyecto](./CONTEXTO-PROYECTO.md)
- [Context Map](../CONTEXT-MAP.yml)
- [Master Inventory](../inventarios/MASTER_INVENTORY.yml)
---
**Version:** 1.0.0
**Ultima Actualizacion:** 2026-01-10